body {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    height: 100vh;
    overflow: hidden;
}

.answer-area table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.answer-area th {
    background: #f8fafc;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    color: #475569;
    font-weight: 700;
}

.answer-area td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}

body {
    -webkit-user-select: none;
    user-select: none;
}

.answer-area,
input,
textarea,
select {
    -webkit-user-select: text;
    user-select: text;
}


/* Custom Scrollbar for Result Area */
.scrollbar-custom::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.scrollbar-custom::-webkit-scrollbar-track {
    background: #f1f5f9;
    /* slate-100 */
    border-radius: 10px;
}

.scrollbar-custom::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    /* slate-300 */
    border-radius: 10px;
    border: 2px solid #f1f5f9;
}

.scrollbar-custom::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
    /* slate-400 */
}

/* Ensure table doesn't break the layout width-wise */
.answer-area {
    overflow-x: auto;
    max-width: 100%;
}

.answer-area table {
    min-width: 600px;
    /* Prevents squishing on small screens */
}

#resultArea {
    scrollbar-gutter: stable;
    /* Keeps the layout from shifting when the scrollbar appears */
}

/* Change cursor globally during drag so it doesn't flicker */
body.resizing {
    cursor: col-resize;
    user-select: none;
    /* Prevent text highlighting */
}

#resizer {
    /* This makes the hit area slightly larger for easier clicking */
    position: relative;
}

/* Optional: Ensure the iframe/markdown tables adjust correctly */
main {
    min-width: 0;
    /* Critical for flex children to shrink/grow properly */
}

/* Targeting the Sidebar Scroll Area */
#sidebarScrollArea {
    /* Smooth scrolling behavior */
    scroll-behavior: smooth;
    /* Ensure it takes up available space but hides overflow-x */
    overflow-x: hidden;
}

/* Custom Scrollbar for Chrome, Safari, and Edge */
#sidebarScrollArea::-webkit-scrollbar {
    width: 5px;
    /* Thin and subtle */
}

#sidebarScrollArea::-webkit-scrollbar-track {
    background: #0f172a;
    /* Slate-900 (Matches sidebar) */
}

#sidebarScrollArea::-webkit-scrollbar-thumb {
    background: #334155;
    /* Slate-700 */
    border-radius: 10px;
    transition: background 0.2s ease;
}

#sidebarScrollArea::-webkit-scrollbar-thumb:hover {
    background: #60a5fa;
    /* Blue-400 (Matches your branding) */
}

/* Firefox Support */
#sidebarScrollArea {
    scrollbar-width: thin;
    scrollbar-color: #334155 #0f172a;
}

/* Polish: Add a subtle fade effect at the bottom of the sidebar */
#sidebar {
    position: relative;
}

#sidebar::after {
    content: '';
    position: absolute;
    bottom: 80px;
    /* Adjust based on your Execute Button height */
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(15, 23, 42, 1), transparent);
    pointer-events: none;
    z-index: 10;
}

/* Styling the Placeholder Scrollbar specifically */
#placeholder.scrollbar-custom::-webkit-scrollbar {
    width: 6px;
}

#placeholder.scrollbar-custom::-webkit-scrollbar-track {
    background: transparent;
    /* Makes it look integrated */
}

#placeholder.scrollbar-custom::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    /* slate-200 */
    border-radius: 10px;
}

#placeholder.scrollbar-custom::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
    /* blue-500 */
}

/* Ensure background glows stay fixed even if content is long */
#placeholder .fixed {
    position: absolute;
}


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

.dashboard-body {
    background: #f4f6f9;
    font-family: "Segoe UI", sans-serif;
}

.dashboard-wrapper {
    text-align: center;
    padding-top: 80px;
}

.dashboard-header h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
}

.dashboard-header p {
    color: #6c757d;
    margin-bottom: 60px;
}

.mode-cards {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.mode-card {
    width: 350px;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.mode-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.08);
}

.card-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.mode-card h2 {
    margin-bottom: 15px;
}

.mode-card p {
    font-size: 14px;
    color: #555;
    min-height: 80px;
}

.mode-card button {
    margin-top: 20px;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.hybrid-card button {
    background: #2563eb;
    color: white;
}

.chatbot-card button {
    background: #111827;
    color: white;
}


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

.chat-body {
    margin: 0;
    background: #f8fafc;
    font-family: "Segoe UI", sans-serif;
}

.chat-layout {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}

.chat-window {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.user-msg {
    background: #2563eb;
    color: white;
    padding: 12px 18px;
    border-radius: 16px;
    max-width: 60%;
    margin-bottom: 15px;
    align-self: flex-end;
}

.bot-msg {
    background: white;
    padding: 12px 18px;
    border-radius: 16px;
    max-width: 70%;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.chat-input {
    display: flex;
    padding: 20px;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.chat-input button {
    margin-left: 10px;
    padding: 12px 20px;
    background: #111827;
    color: white;
    border: none;
    border-radius: 8px;
}