/* ==========================================
   DemandOS – Design System (AetherAI Dark)
   ========================================== */

:root {
    --bg-page:        #0C0D10;
    --bg-surface:     #141518;
    --bg-surface-2:   #1A1C20;
    --bg-sidebar:     #0E0F13;
    --bg-hover:       #1E2026;
    --bg-input:       #1C1E24;
    --border:         rgba(255,255,255,0.07);
    --border-hover:   rgba(255,255,255,0.12);
    --border-focus:   rgba(91,138,245,0.5);
    --text-primary:   rgba(255,255,255,0.88);
    --text-secondary: rgba(255,255,255,0.45);
    --text-muted:     rgba(255,255,255,0.22);
    --text-inverse:   #0C0D10;
    --accent:         #5B8AF5;
    --accent-hover:   #4A79E8;
    --accent-light:   rgba(91,138,245,0.10);
    --accent-border:  rgba(91,138,245,0.22);
    --success:        #4ADE80;
    --warning:        #FBBF24;
    --error:          #F87171;
    --red:            #F87171;
    --green:          #4ADE80;
    --radius-sm:      6px;
    --radius-md:      10px;
    --radius-lg:      14px;
    --radius-xl:      22px;
    --radius-full:    9999px;
    --shadow-xs:      0 1px 4px rgba(0,0,0,0.5);
    --shadow-sm:      0 2px 8px rgba(0,0,0,0.6);
    --shadow-md:      0 4px 20px rgba(0,0,0,0.65);
    --shadow-lg:      0 12px 40px rgba(0,0,0,0.8);
    --sidebar-width:  256px;
    --header-height:  54px;
    --font:           'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition:     0.15s cubic-bezier(0.4,0,0.2,1);
}

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

html, body {
    height: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================
   Layout
   ========================================== */

.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ==========================================
   Sidebar
   ========================================== */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform var(--transition);
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #5B8AF5 0%, #7C3AED 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.new-chat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px;
    padding: 9px 14px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    color: #FFFFFF;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.new-chat-btn:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-sm);
}

/* Primary nav */
.sidebar-nav {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item--active {
    background: rgba(91,138,245,0.12);
    color: #5B8AF5;
}

/* Recent chats */
.sidebar-section {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
}

.section-title {
    padding: 8px 8px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: rgba(255,255,255,0.2);
}

.session-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.session-item {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.session-item.active {
    background: rgba(91,138,245,0.12);
    color: #5B8AF5;
}

.empty-sessions {
    padding: 12px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-block {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.user-block:hover {
    background: var(--bg-hover);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(91,138,245,0.2);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-plan {
    font-size: 11px;
    color: var(--text-muted);
}

.admin-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.admin-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ==========================================
   Chat Main
   ========================================== */

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-page);
}

/* ==========================================
   Header
   ========================================== */

.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    height: var(--header-height);
    background: var(--bg-surface);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
    z-index: 10;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
}

.model-selector {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: -0.2px;
}

.model-selector:hover {
    color: var(--accent);
}

/* Header menu dropdown */
.header-menu-wrap {
    position: relative;
}

.header-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    background: var(--bg-surface);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    padding: 6px;
    z-index: 200;
    animation: dropIn .15s ease-out;
}

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

.hd-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: background .12s;
    text-align: left;
}
.hd-item:hover { background: var(--bg-hover); }
.hd-item svg   { flex-shrink: 0; color: var(--text-secondary); }

.hd-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 4px 8px;
}

.header-spacer {
    flex: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 10px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    white-space: nowrap;
}

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

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

.icon-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* ==========================================
   Chat Messages
   ========================================== */

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-full);
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: messageIn 0.25s ease-out;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

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

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.message.bot .message-avatar {
    background: rgba(91,138,245,0.15);
    color: var(--accent);
}

.message.user .message-avatar {
    background: rgba(91,138,245,0.2);
    color: var(--accent);
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.7;
    word-wrap: break-word;
}

.message.bot .message-bubble {
    background: var(--bg-surface-2);
    border-top-left-radius: 4px;
    box-shadow: var(--shadow-xs);
    color: var(--text-primary);
}

.message.user .message-bubble {
    background: linear-gradient(135deg, #5B8AF5, #7C3AED);
    border-top-right-radius: 4px;
    color: white;
}

.message-bubble strong {
    font-weight: 600;
}

.message.bot .message-bubble code {
    background: var(--bg-page);
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid var(--border);
}

.message.user .message-bubble code {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.message.bot .message-bubble a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.message.bot .message-bubble a:hover {
    text-decoration: underline;
}

.message.user .message-bubble a {
    color: rgba(255,255,255,0.8);
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 4px;
}

.message.user .message-time {
    text-align: right;
}

/* Payment Card */
.payment-card {
    margin-top: 12px;
    padding: 16px;
    background: var(--accent-light);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-md);
}

.payment-card .amount {
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
    margin: 6px 0;
}

.payment-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    margin-top: 8px;
}

.payment-btn:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Pricing Table */
.pricing-table {
    width: 100%;
    margin: 12px 0;
    border-collapse: collapse;
    font-size: 13px;
}

.pricing-table td {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.pricing-table td:last-child {
    text-align: right;
    font-weight: 500;
    color: var(--text-primary);
}

.pricing-table tr.total td {
    border-top: 2px solid var(--accent-border);
    border-bottom: none;
    font-weight: 700;
    font-size: 15px;
    padding-top: 10px;
    color: var(--accent);
}

/* Results Preview */
.results-preview {
    margin-top: 12px;
    max-height: 280px;
    overflow-y: auto;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* ==========================================
   Chat Input
   ========================================== */

.chat-input-container {
    padding: 12px 24px 20px;
    background: var(--bg-page);
    flex-shrink: 0;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0 10px;
    max-width: 760px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 13px;
}

.typing-indicator span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    animation: typing 1.4s infinite;
}

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

@keyframes typing {
    0%, 60%, 100% { opacity: 0.2; transform: scale(0.8); }
    30%           { opacity: 1;   transform: scale(1.1); }
}

.chat-input-form {
    max-width: 760px;
    margin: 0 auto;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 10px 12px 10px 16px;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: rgba(91,138,245,0.4);
}

.input-divider {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.1);
    margin: 0 12px;
    flex-shrink: 0;
}

.input-wrapper textarea {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    outline: none;
    min-height: 24px;
    max-height: 140px;
    padding: 0;
}

.input-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.upload-label {
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s;
    flex-shrink: 0;
}

.upload-label:hover { color: rgba(255,255,255,0.7); }

.send-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: var(--accent);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    opacity: 0.3;
    margin-left: 8px;
}

.send-btn:not(:disabled) { opacity: 1; }
.send-btn:not(:disabled):hover { background: var(--accent-hover); transform: scale(1.05); }
.send-btn:disabled { cursor: not-allowed; }

/* Pills row BELOW the input */
.input-pills-row {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 0 4px;
}

.input-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.input-pill:hover {
    background: rgba(91,138,245,0.1);
    border-color: rgba(91,138,245,0.28);
    color: #5B8AF5;
}

/* ==========================================
   Welcome Screen
   ========================================== */

.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 20px 28px;
    min-height: 100%;
    animation: fadeIn 0.3s ease-out;
}

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

.welcome-greeting {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* Launch badge */
.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.28);
    color: #a5b4fc;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 14px;
}

.welcome-headline {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.6px;
    line-height: 1.2;
}

.welcome-sub {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 440px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.welcome-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
    justify-content: center;
}
.wf-dot { opacity: 0.4; }

/* Use-cases strip */
.use-cases {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 620px;
}

.use-case {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.use-case__icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

.use-case__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.use-case__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.use-case__sub {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.use-case__divider {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    margin: 0 16px;
    flex-shrink: 0;
}

/* How it works steps */
.how-it-works {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 14px 20px;
}

.hiw-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.hiw-icon {
    font-size: 20px;
    line-height: 1;
}

.hiw-label {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.hiw-arrow {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0 4px;
    padding-bottom: 12px;
}

/* Section divider with label */
.welcome-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 820px;
    margin-bottom: 14px;
}
.welcome-divider::before,
.welcome-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.07);
}
.welcome-divider span {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Bottom features strip */
.welcome-features {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}
.welcome-features span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================
   Visual Cards
   ========================================== */

.vcard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 860px;
    width: 100%;
}

.vcard {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 14px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-family: var(--font);
    color: var(--text-primary);
    gap: 0;
}

.vcard:hover {
    background: rgba(91,138,245,0.08);
    border-color: rgba(91,138,245,0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(91,138,245,0.1);
}

.vcard:active {
    transform: translateY(0);
}

/* Top row: icon + tag */
.vcard__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 10px;
}

.vcard__icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(91,138,245,0.1);
    border: 1px solid rgba(91,138,245,0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.vcard__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 5px;
}

.vcard__desc {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card tag — inline no topo direito */
.vcard__tag {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.22);
    padding: 2px 7px;
    border-radius: 50px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==========================================
   Loading Dots
   ========================================== */

.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: loadBounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadBounce {
    0%, 80%, 100% { transform: scale(0); }
    40%           { transform: scale(1); }
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 768px) {
    /* Sidebar becomes mobile drawer */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .mobile-menu-btn {
        display: flex;
    }

    /* Header: tighter on mobile */
    .chat-header {
        padding: 0 12px;
        gap: 8px;
    }
    .status-text {
        display: none;
    }
    .status-badge {
        padding: 4px 8px;
    }

    /* Welcome screen */
    .welcome-headline {
        font-size: 22px;
    }
    .welcome-sub {
        font-size: 13px;
        margin-bottom: 20px;
    }

    /* Cards: 2 columns on tablet */
    .vcard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .vcard__desc {
        display: none; /* esconde desc em telas menores */
    }

    /* Chat */
    .chat-messages {
        padding: 12px 14px;
    }
    .chat-input-container {
        padding: 6px 12px 14px;
    }

    /* Share button: icon only */
    .btn-secondary span {
        display: none;
    }
    .btn-secondary {
        padding: 6px 8px;
        min-width: unset;
    }
}

@media (max-width: 480px) {
    /* Cards: 2 cols compact */
    .vcard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }
    .vcard {
        padding: 12px 12px 14px;
    }
    .vcard__icon {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }
    .vcard__title {
        font-size: 12px;
    }
    .vcard__desc { display: none; }

    /* Pills: horizontal scroll */
    .input-pills-row {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 2px;
    }
    .input-pills-row::-webkit-scrollbar { display: none; }
    .input-pill { flex-shrink: 0; }

    /* Welcome */
    .welcome-headline {
        font-size: 20px;
        letter-spacing: -0.3px;
    }
    .welcome-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
    .use-case__divider {
        width: 100%;
        height: 1px;
        margin: 0;
    }
    .use-case__title { white-space: normal; }
    .use-case__sub   { white-space: normal; }
    .hide-mobile { display: none; }

    /* Header menu dropdown: align to right edge */
    .header-dropdown {
        right: -8px;
    }
}

/* =============================================
   AUTH PAGE (login.html)
   ============================================= */

body.auth-page {
    background: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-surface-2);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 8px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all .15s;
}

.auth-tab--active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.auth-banner {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

.auth-banner--error {
    background: rgba(248,113,113,0.1);
    color: #F87171;
    border: 1px solid rgba(248,113,113,0.2);
}

.auth-banner--success {
    background: rgba(74,222,128,0.1);
    color: #4ADE80;
    border: 1px solid rgba(74,222,128,0.2);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.settings-input {
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-surface-2);
    outline: none;
    transition: border-color .15s;
    width: 100%;
    box-sizing: border-box;
}

.form-group input:focus,
.settings-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.input-password-wrap {
    position: relative;
}

.input-password-wrap input {
    padding-right: 40px;
}

.toggle-pw {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.toggle-pw:hover { color: var(--text-primary); }

.auth-submit {
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s;
    width: 100%;
}

.auth-submit:hover { background: var(--accent-hover); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; }

.auth-footer-text {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

/* =============================================
   CONTA PAGE
   ============================================= */

.conta-content {
    padding: 32px;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.conta-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 24px;
    color: var(--text-secondary);
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: typingDot 1.2s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes typingDot {
    0%, 80%, 100% { opacity: .3; transform: scale(.8); }
    40% { opacity: 1; transform: scale(1); }
}

.conta-section {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
}

.conta-greeting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.conta-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.conta-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.conta-banner {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

.conta-banner--success {
    background: rgba(74,222,128,0.1);
    color: #4ADE80;
    border: 1px solid rgba(74,222,128,0.2);
}

.plan-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.plan-badge--free {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.12);
}

.plan-badge--pro {
    background: rgba(91,138,245,0.12);
    color: #5B8AF5;
}

.plan-badge--business {
    background: rgba(167,139,250,0.1);
    color: #A78BFA;
}

.section-header {
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon--blue { background: rgba(91,138,245,0.12); color: var(--accent); }
.stat-icon--green { background: rgba(74,222,128,0.1); color: #4ADE80; }
.stat-icon--purple { background: rgba(167,139,250,0.1); color: #A78BFA; }

.stat-body {
    flex: 1;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.stat-action {
    padding: 6px 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
    align-self: flex-start;
}

.stat-action:hover { background: var(--accent-hover); }

/* History table */
.history-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.history-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-secondary);
    background: var(--bg-surface-2);
    border-bottom: 1px solid var(--border);
}

.history-table td {
    padding: 12px 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: var(--bg-hover); }

.actor-name {
    font-weight: 500;
}

.date-cell {
    color: var(--text-secondary);
    white-space: nowrap;
}

.status-chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.status-chip--completed  { background: rgba(74,222,128,0.1);  color: #4ADE80; }
.status-chip--running    { background: var(--accent-light);    color: var(--accent); }
.status-chip--pending    { background: rgba(251,191,36,0.1);   color: #FBBF24; }
.status-chip--failed     { background: rgba(248,113,113,0.1);  color: #F87171; }

/* Download buttons in extractions table */
.download-cell { white-space: nowrap; }

.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
    text-decoration: none;
    transition: opacity .15s, transform .1s;
    margin-right: 4px;
}
.dl-btn:hover { opacity: .8; transform: translateY(-1px); }
.dl-btn--json { background: rgba(91,138,245,0.15); color: var(--accent); }
.dl-btn--csv  { background: rgba(74,222,128,0.12); color: #4ADE80; }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 24px;
    color: var(--text-secondary);
    text-align: center;
}

.empty-state a { color: var(--accent); }

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.settings-card {
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-card__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-secondary);
}

.settings-card__row {
    display: flex;
    gap: 8px;
}

.settings-save-btn {
    padding: 10px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background .15s;
}

.settings-save-btn:hover { background: var(--accent-hover); }

.btn-outline {
    padding: 10px 16px;
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
    align-self: flex-start;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* =============================================
   MODALS
   ============================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.8);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: background .15s;
}

.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 20px;
}

/* Topup options */
.topup-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.topup-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px 12px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg-surface-2);
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}

.topup-option:hover {
    border-color: var(--accent);
    background: rgba(91,138,245,0.08);
}

.topup-option--featured {
    border-color: var(--accent);
    background: rgba(91,138,245,0.08);
}

.topup-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.topup-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.topup-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Nav item as link */
a.nav-item {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive – conta */
@media (max-width: 768px) {
    .conta-content { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .topup-options { grid-template-columns: repeat(3, 1fr); }
}

/* =============================================
   AUTH REQUIRED CARD
   ============================================= */

.auth-prompt-card {
    margin: 8px 0 8px 44px;
    background: var(--bg-surface);
    border: 1px solid rgba(99,102,241,0.35);
    border-radius: 14px;
    padding: 20px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeSlideUp 0.25s ease;
}

.ap-icon {
    font-size: 28px;
    line-height: 1;
}

.ap-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ap-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.ap-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.ap-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ap-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity .15s, transform .1s;
}

.ap-btn:active { transform: scale(.97); }
.ap-btn:hover  { opacity: .88; }

.ap-btn--primary {
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    color: #fff;
    flex: 1;
}

.ap-btn--secondary {
    background: rgba(255,255,255,0.07);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.12);
    flex: 1;
}

@media (max-width: 768px) {
    .auth-prompt-card {
        margin: 8px 0;
        max-width: 100%;
    }
}

/* =============================================
   VOLUME PICKER CARD
   ============================================= */

.volume-picker-card {
    margin: 8px 0 8px 44px;
    background: var(--bg-surface);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 4px;
    max-width: 460px;
    animation: fadeIn .25s ease-out;
}

.vp-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 14px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.vp-filters {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vp-tiers {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
}

.vp-tier {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s;
    font-family: var(--font);
    width: 100%;
    text-align: left;
}
.vp-tier:hover:not(:disabled) {
    background: rgba(91,138,245,0.08);
    border-color: rgba(91,138,245,0.2);
}
.vp-tier--popular {
    background: rgba(91,138,245,0.06);
    border-color: rgba(91,138,245,0.18);
}
.vp-tier--selected {
    background: rgba(91,138,245,0.15) !important;
    border-color: var(--accent) !important;
}
.vp-tier:disabled {
    opacity: .5;
    cursor: default;
}

.vp-tier__left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.vp-tier__num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.vp-tier__icon { font-size: 18px; line-height: 1; }
.vp-tier__info { display: flex; flex-direction: column; gap: 1px; }
.vp-tier__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.vp-tier__volume {
    font-size: 11px;
    color: var(--text-secondary);
}

.vp-tier__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.vp-badge {
    font-size: 10px;
    font-weight: 700;
    background: rgba(91,138,245,0.2);
    color: var(--accent);
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: .3px;
}
.vp-tier__price {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.vp-custom {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 4px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 4px;
}
.vp-custom-input {
    flex: 1;
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: var(--font);
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: border-color .15s;
    -moz-appearance: textfield;
}
.vp-custom-input::-webkit-inner-spin-button,
.vp-custom-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.vp-custom-input:focus { border-color: var(--accent); }
.vp-custom-input--error { border-color: #F87171 !important; animation: shake .3s; }

@keyframes shake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-4px); }
    75%      { transform: translateX(4px); }
}

.vp-custom-btn {
    width: 34px;
    height: 34px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity .15s;
    color: white;
}
.vp-custom-btn:hover:not(:disabled) { opacity: .85; }
.vp-custom-btn:disabled { opacity: .4; cursor: default; }

.vp-note {
    padding: 6px 14px 10px;
    font-size: 10.5px;
    color: var(--text-muted);
    text-align: center;
}

/* Mobile: volume picker full width */
@media (max-width: 768px) {
    .volume-picker-card {
        margin: 8px 0;
        max-width: 100%;
    }
}

/* =============================================
   PIX QR CODE CARD
   ============================================= */

.pix-card {
    margin: 8px 0 8px 44px;
    background: var(--bg-surface);
    border: 1.5px solid rgba(91,138,245,0.2);
    border-radius: 16px;
    padding: 20px;
    max-width: 340px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.pix-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pix-card__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.pix-card__amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.pix-card__qr {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1A1C22;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    min-height: 240px;
    margin-bottom: 14px;
}

.pix-card__qr-img {
    width: 240px;
    height: 240px;
    display: block;
}

.pix-card__qr-fallback {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
}

/* Payment confirmed overlay */
.pix-card__status-overlay {
    position: absolute;
    inset: 0;
    background: rgba(22,163,74,.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 12px;
    animation: fadeIn .3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(.9); }
    to   { opacity: 1; transform: scale(1); }
}

.pix-card__paid-check {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pix-card__paid-text {
    color: white;
    font-weight: 700;
    font-size: 15px;
    margin: 0;
}

/* Copy code row */
.pix-card__copy-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.pix-card__copy-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 11px;
    font-family: monospace;
    color: var(--text-secondary);
    background: var(--bg-surface-2);
    outline: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pix-card__copy-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}

.pix-card__copy-btn:hover { background: var(--accent-hover); }

/* Open checkout link button */
.pix-card__link-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    margin-bottom: 12px;
}

.pix-card__link-btn:hover { background: rgba(91,138,245,0.18); }

/* Footer with pulse */
.pix-card__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.pix-pulse {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    animation: pixPulse 1.6s ease-in-out infinite;
}

@keyframes pixPulse {
    0%, 100% { opacity: .3; transform: scale(.8); }
    50%       { opacity: 1;  transform: scale(1.2); }
}

/* =============================================
   PAYMENT CONFIRMED TOAST
   ============================================= */

.payment-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #16A34A;
    color: white;
    padding: 14px 24px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(22,163,74,.4);
    z-index: 2000;
    transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .35s ease;
    opacity: 0;
    white-space: nowrap;
}

.payment-toast--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 480px) {
    .vcard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .input-pills-row {
        display: none;
    }
}

/* ==========================================
   Sidebar Scrollbar
   ========================================== */

.sidebar-section::-webkit-scrollbar { width: 3px; }
.sidebar-section::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-full);
}

/* ==========================================
   Overlay (mobile)
   ========================================== */

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 90;
}

.sidebar-overlay.active {
    display: block;
}

/* ==========================================
   Generic Toast (file upload, share, etc.)
   ========================================== */

.generic-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: var(--bg-surface);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    white-space: nowrap;
}
.generic-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =============================================
   WHATSAPP SUPPORT BUTTON
   ============================================= */

.whatsapp-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    padding: 12px 18px 12px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    transition: transform .2s, box-shadow .2s, opacity .2s;
    white-space: nowrap;
}

.whatsapp-fab:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}

.whatsapp-fab:active {
    transform: scale(.97);
}

.whatsapp-fab svg {
    flex-shrink: 0;
}

.whatsapp-fab__label {
    line-height: 1;
}

@media (max-width: 480px) {
    .whatsapp-fab {
        bottom: 16px;
        right: 16px;
        padding: 12px;
        border-radius: 50%;
    }
    .whatsapp-fab__label {
        display: none;
    }
}
