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

:root {
    --primary:      #3ecf8e;
    --primary-deep: #24b47e;
    --ink:          #171717;
    --ink-mute:     #707070;
    --ink-mute-2:   #9a9a9a;
    --canvas:       #ffffff;
    --canvas-soft:  #fafafa;
    --hairline:     #dfdfdf;
    --hairline-strong: #c7c7c7;

    --bg:           var(--canvas-soft);
    --white:        #ffffff;
    --border:       var(--hairline);
    --border-dark:  var(--hairline-strong);
    --text:         var(--ink);
    --muted:        var(--ink-mute);
    --dim:          var(--ink-mute-2);
    --accent:       var(--primary);
    --accent-deep:  var(--primary-deep);
    --on-accent:    var(--ink);
    
    --radius-xs:    4px;
    --radius-sm:    6px;
    --radius-md:    8px;
    --radius-lg:    12px;
    --radius-full:  9999px;
    
    --font:         'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mono:         ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;
}

body.dark-mode {
    --bg:           #141414;
    --white:        #1c1c1c;
    --canvas-soft:  #181818;
    --border:       #2a2a2a;
    --border-dark:  #444444;
    --text:         #ededed;
    --muted:        #9a9a9a;
    --dim:          #555555;
    --accent:       var(--primary);
    --accent-deep:  var(--primary-deep);
    --on-accent:    #171717;
}

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

html {
    height: 100%;
    background: var(--bg);
}

body {
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
}

/* smooth theme morphing on all elements */
.column-left, .column-center, .column-right,
.header, .card, input, textarea, select, button,
.badge, .ai-contact-row, .console-box, details {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* ── HEADER ── */
.header {
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.logo {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.2px;
}
.logo span {
    color: var(--primary);
}

.badge {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.badge::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dim);
}
.badge.status-connected {
    color: var(--primary);
    border-color: rgba(62, 207, 142, 0.2);
    background: rgba(62, 207, 142, 0.05);
    font-weight: 600;
}
.badge.status-connected::before { background: var(--primary); }

.badge.status-connecting {
    color: #eab308;
    border-color: rgba(234, 179, 8, 0.2);
    background: rgba(234, 179, 8, 0.05);
}
.badge.status-connecting::before { background: #eab308; }

.badge.status-disconnected {
    color: var(--dim);
    border-color: var(--border);
    background: var(--bg);
}
.badge.status-disconnected::before { background: var(--dim); }

.badge.status-conflict {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.05);
    font-weight: 600;
}
.badge.status-conflict::before { background: #ef4444; }

/* ── LAYOUT ── */
body { display: flex; flex-direction: column; }

.container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.column-left,
.column-center,
.column-right {
    overflow-y: auto;
    padding: 1.5rem;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--bg);
}
.column-right { border-right: none; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── CARDS (box containers) ── */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.panel-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    letter-spacing: -0.1px;
}

/* ── QR BOX ── */
.qr-box {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    min-height: 160px;
    background: var(--bg);
}
#qr-image { max-width: 130px; height: auto; display: block; mix-blend-mode: multiply; }
body.dark-mode #qr-image { filter: invert(1); mix-blend-mode: normal; }
.placeholder-text { font-size: 0.78rem; color: var(--muted); text-align: center; }

/* ── FORM ── */
label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 0.35rem;
}
.hint {
    font-size: 0.68rem;
    color: var(--dim);
    margin-top: 0.3rem;
}
.field { margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }

input, textarea, select {
    width: 100%;
    padding: 0.5rem 0.7rem;
    font-family: var(--font);
    font-size: 0.88rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    outline: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
}
textarea { resize: vertical; }
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a3a3a3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    padding-right: 2rem;
    cursor: pointer;
}
body.dark-mode select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
}

/* ── BUTTONS (boxy & technical) ── */
button {
    width: 100%;
    padding: 0.5rem 0.85rem;
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}
button:hover { background: var(--bg); border-color: var(--border-dark); }
button:active { transform: scale(0.98); }
button:disabled { color: var(--dim); cursor: not-allowed; opacity: 0.6; }

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
    font-weight: 600;
}
.btn-primary:hover {
    background: var(--accent-deep);
    border-color: var(--accent-deep);
    color: var(--on-accent);
}

.btn-sm { width: auto; padding: 0.35rem 0.65rem; font-size: 0.78rem; }

.row-btns { display: flex; gap: 0.5rem; align-items: center; }
.row-btns select, .row-btns input { flex: 1; }

/* ── STATUS MSG ── */
.status-msg { font-size: 0.72rem; min-height: 1rem; margin-top: 0.4rem; font-family: var(--mono); }
.status-msg.success { color: #22c55e; font-weight: 600; }
.status-msg.error   { color: #ef4444; }

/* ── MESSAGES ── */
.feed-panel { display: flex; flex-direction: column; flex: 1.35; min-height: 0; }
.console-panel { display: flex; flex-direction: column; flex: 0.65; min-height: 0; }

.feed-box {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

.message-card {
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--white);
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    animation: fadeIn 0.2s ease forwards;
}
.message-card:last-child { margin-bottom: 0; }

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}
.message-sender { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.message-time   { font-size: 0.68rem; color: var(--dim); font-family: var(--mono); flex-shrink: 0; }
.message-body   { font-size: 0.84rem; color: var(--muted); word-break: break-word; }

.select-sender-btn {
    width: auto !important;
    padding: 0.15rem 0.35rem !important;
    font-size: 0.65rem !important;
    background: var(--white) !important;
    color: var(--muted) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-xs) !important;
    cursor: pointer;
    font-weight: 500;
}
.select-sender-btn:hover { border-color: var(--border-dark) !important; color: var(--text) !important; }

/* SQL / Technical log console */
.console-box {
    flex: 1;
    overflow-y: auto;
    font-family: var(--mono);
    font-size: 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    color: #e5e5e5;
    background: #1c1c1c; /* Always dark Canvas Night */
    line-height: 1.6;
}
.log-row { border-bottom: 1px solid #2a2a2a; padding: 0.25rem 0; }
.log-row:last-child { border-bottom: none; }

/* ── CONTACTS ── */
.contacts-list-container { display: flex; flex-direction: column; }

.ai-contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    margin-bottom: 0.5rem;
    gap: 0.5rem;
    animation: fadeIn 0.2s ease forwards;
}
.ai-contact-row:last-child { margin-bottom: 0; }

.contact-info { display: flex; flex-direction: column; gap: 0.1rem; overflow: hidden; flex: 1; }
.contact-number { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.contact-prompt { font-size: 0.7rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.remove-badge-btn {
    font-size: 0.85rem;
    color: var(--dim);
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.1s;
}
.remove-badge-btn:hover { color: #ef4444; }

.empty-state {
    font-size: 0.75rem;
    color: var(--dim);
    text-align: center;
    padding: 1rem 0;
}

/* ── COLLAPSIBLE DETAILS ── */
details.card {
    padding: 0;
}
details.card summary {
    padding: 1.25rem 1.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: none;
    user-select: none;
}
details.card summary::-webkit-details-marker { display: none; }
details.card summary::after {
    content: "+";
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--dim);
}
details.card[open] summary::after { content: "−"; }
details.card[open] summary {
    border-bottom: 1px solid var(--border);
}
.details-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

details.inner-details {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--bg);
}
details.inner-details summary {
    padding: 0.6rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: none;
}
details.inner-details summary::after {
    content: "↓";
    font-size: 0.72rem;
    color: var(--dim);
}
details.inner-details[open] summary::after { content: "↑"; }
details.inner-details[open] .inner-content {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
    background: var(--white);
}

/* ── ANIMATIONS ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
details[open] .details-content,
details[open] .inner-content {
    animation: fadeIn 0.18s ease forwards;
}

/* ── CONVERSATIONAL CHAT LIST & MODAL OVERLAY ── */
.chat-row-item {
    display: flex;
    flex-direction: column;
    padding: 0.85rem 1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    animation: fadeIn 0.2s ease forwards;
}
.chat-row-item:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
body.dark-mode .chat-row-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.chat-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}
.chat-row-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}
.chat-row-time {
    font-size: 0.7rem;
    color: var(--dim);
}
.chat-row-snippet {
    font-size: 0.76rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal Overlay Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFadeIn 0.2s ease forwards;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 580px;
    height: 80%;
    max-height: 650px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: modalSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
body.dark-mode .modal-card {
    background: #171717;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
@keyframes modalSlideUp {
    from { transform: translateY(12px) scale(0.98); }
    to { transform: translateY(0) scale(1); }
}
.modal-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.015em;
}
.modal-subtitle {
    font-size: 0.72rem;
    color: var(--dim);
    font-family: var(--font-mono);
    margin-top: 0.15rem;
}
.close-btn {
    background: none;
    border: none;
    color: var(--dim);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.1s;
}
.close-btn:hover {
    color: var(--text);
}
.modal-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: var(--bg);
}
body.dark-mode .modal-body {
    background: #141414;
}

/* Chat Bubbles Layout */
.bubble-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: bubblePop 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes bubblePop {
    from { transform: scale(0.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.bubble-wrapper.received {
    align-self: flex-start;
    align-items: flex-start;
}
.bubble-wrapper.sent {
    align-self: flex-end;
    align-items: flex-end;
}
.bubble-meta {
    font-size: 0.65rem;
    color: var(--dim);
    margin-bottom: 0.2rem;
    padding: 0 0.25rem;
}
.chat-bubble {
    padding: 0.65rem 0.95rem;
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.4;
    word-break: break-word;
}
.bubble-wrapper.received .chat-bubble {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
    border-bottom-left-radius: 4px;
}
.bubble-wrapper.sent .chat-bubble {
    background: var(--primary);
    color: #171717;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

/* Modal Footer & Input */
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--white);
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
body.dark-mode .modal-footer {
    background: #171717;
}
.modal-footer input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    color: var(--text);
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.15s;
}
.modal-footer input:focus {
    border-color: var(--primary);
}

.delete-chat-btn {
    transition: color 0.12s ease;
}
.delete-chat-btn:hover {
    color: #ef4444 !important;
}

body.dark-mode #detail-chat-history {
    background: #141414 !important;
}
#detail-quick-reply-form {
    background: var(--white) !important;
}
body.dark-mode #detail-quick-reply-form {
    background: #171717 !important;
}

/* ── SYSTEM AUTO-DARK MODE ── */
@media (prefers-color-scheme: dark) {
    body:not(.light-mode) {
        --bg:           #141414;
        --white:        #1c1c1c;
        --canvas-soft:  #181818;
        --border:       #2a2a2a;
        --border-dark:  #444444;
        --text:         #ededed;
        --muted:        #9a9a9a;
        --dim:          #555555;
        --accent:       var(--primary);
        --accent-deep:  var(--primary-deep);
        --on-accent:    #171717;
    }
    
    body:not(.light-mode) #qr-image { filter: invert(1); mix-blend-mode: normal; }
    body:not(.light-mode) #detail-chat-history { background: #141414 !important; }
    body:not(.light-mode) #detail-quick-reply-form { background: #171717 !important; }
    body:not(.light-mode) .console-box { background: #1c1c1c; }
    body:not(.light-mode) .chat-row-item:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
    body:not(.light-mode) .modal-card { background: #171717; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5); }
    body:not(.light-mode) .modal-body { background: #141414; }
    body:not(.light-mode) .modal-footer { background: #171717; }
}

/* ── LANDING PAGE SPECIFIC STYLES ── */
body.landing-page {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
}

body.landing-page .header {
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

body.landing-page .main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.hero-auth-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 968px) {
    .hero-auth-row {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.marketing-content-full {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    width: 100%;
}

.hero-group {
    display: flex;
    flex-direction: column;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.2px;
    color: var(--text);
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--muted);
    margin-top: 1.25rem;
    max-width: 620px;
}

.section-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

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

.step-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.step-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(62, 207, 142, 0.06);
}

body.dark-mode .step-card:hover,
body:not(.light-mode) .step-card:hover {
    box-shadow: 0 8px 20px rgba(62, 207, 142, 0.03);
}

.step-num {
    font-size: 0.68rem;
    font-family: var(--mono);
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.step-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.2px;
}

.step-card p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--muted);
}

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

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

.feature-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-box:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(62, 207, 142, 0.06);
}

.feature-box h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.2px;
}

.feature-box h4 span {
    color: var(--primary);
    font-size: 0.7rem;
}

.feature-box p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--muted);
}

/* Auth Card Card Container */
.auth-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.auth-card .tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
}

.auth-card .tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.85rem 0.5rem;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
}

.auth-card .tab:hover {
    color: var(--text);
    background: none;
    border-color: transparent;
}

.auth-card .tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-card .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.auth-card label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.auth-card input {
    font-size: 0.9rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
}

.auth-card .btn {
    background: var(--primary);
    color: #171717;
    border: 1px solid var(--primary);
    font-weight: 700;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease, border-color 0.15s ease;
    margin-top: 0.5rem;
    width: 100%;
}

.auth-card .btn:hover {
    background: var(--primary-deep);
    border-color: var(--primary-deep);
    color: #171717;
}

.auth-card .message {
    font-size: 0.78rem;
    font-family: var(--mono);
    line-height: 1.5;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    display: none;
    animation: fadeIn 0.15s ease forwards;
}

.auth-card .message.success {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.15);
    color: #22c55e;
    display: block;
}

.auth-card .message.error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #ef4444;
    display: block;
}

/* ── 3-DOT OPTIONS DROPDOWN STYLES ── */
.options-trigger-btn:hover {
    background-color: var(--border) !important;
    color: var(--text) !important;
}
.options-trigger-btn:focus {
    outline: none;
}
.dropdown-menu-item {
    transition: background-color 0.12s ease;
}
.dropdown-menu-item:hover {
    background-color: var(--bg) !important;
}

/* ── FAQ DETAILS & USE CASES STYLES ── */
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}
.faq-item summary {
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.25rem 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: "+";
    font-size: 1.15rem;
    color: var(--muted);
    font-weight: normal;
    transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
    content: "−";
    transform: rotate(90deg);
}
.faq-content {
    margin-top: 0.75rem;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.6;
}
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}
@media (max-width: 640px) {
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
}
.use-case-box {
    background: var(--canvas-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.use-case-box h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}
.use-case-box p {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
}
.landing-footer {
    grid-column: 1 / span 2;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    margin-top: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--dim);
}
@media (max-width: 968px) {
    .landing-footer {
        grid-column: 1;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

html:has(body.landing-page) {
    overflow-y: auto !important;
    height: auto !important;
}





/* ── REACT-SPREADSHEET OVERRIDES ── */
.sheet-wrapper .Spreadsheet {
    --background-color: var(--white);
    --border-color: var(--border);
    width: 100%;
}
.sheet-wrapper .Spreadsheet table {
    border-collapse: collapse;
    width: 100%;
}
.sheet-wrapper .Spreadsheet__header {
    background: var(--canvas-soft) !important;
    color: var(--dim) !important;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid var(--border) !important;
}
.sheet-wrapper .Spreadsheet__cell,
.sheet-wrapper .Spreadsheet__cell--readonly {
    background: var(--white) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    font-size: 0.8rem;
}
.sheet-wrapper .Spreadsheet__cell--selected {
    outline: 2px solid var(--primary) !important;
    outline-offset: -1px;
    box-shadow: none !important;
}
.sheet-wrapper .Spreadsheet__active-cell {
    outline: 2px solid var(--primary) !important;
}
.sheet-wrapper .Spreadsheet__active-cell input,
.sheet-wrapper .Spreadsheet__active-cell textarea {
    font-family: var(--font) !important;
    font-size: 0.8rem !important;
    color: var(--text) !important;
    background: var(--white) !important;
    caret-color: var(--primary);
}
