:root { 
    --primary: #0284c7; 
    --bg-main: #f1f5f9; 
    --panel-bg: #ffffff;
    --border: #e2e8f0;
    --text-dark: #1e293b;
    --text-muted: #64748b;
}

* { box-sizing: border-box; }
body { 
    font-family: 'Inter', sans-serif; 
    margin: 0; height: 100vh; display: flex; flex-direction: column; 
    background: var(--bg-main); color: var(--text-dark); overflow: hidden; 
    /* Fix for mobile viewports */
html, body {
    height: 100%;
    margin: 0;
    overflow: hidden; /* Prevents the whole page from bouncing */
    }

.main-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    /* This is the magic line for mobile browsers */
    height: -webkit-fill-available; 
    }

#chat-display {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS */
    }
}

/* --- Header --- */
#title-bar { 
    background: #000; color: white; padding: 0 20px; 
    display: flex; justify-content: space-between; align-items: center; 
    height: 75px; flex-shrink: 0; z-index: 10;
}
.brand-group { display: flex; flex-direction: column; }
.logo-main { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.u3-badge { background: var(--primary); font-size: 0.6rem; padding: 2px 6px; border-radius: 4px; font-weight: bold; }
.tagline-sub { margin: 0; font-size: 0.7rem; color: #38bdf8; font-style: italic; }

/* --- Dropdowns Row --- */
.dropdown-group { display: flex; flex-direction: row !important; gap: 15px; align-items: center; }
.nav-item { display: flex; flex-direction: column; width: 140px; }
.nav-label { font-size: 0.7rem; font-weight: 800; color: #94a3b8; text-transform: uppercase; margin-bottom: 4px; }
select { background: #1e293b; color: white; border: 1px solid #475569; padding: 6px; border-radius: 6px; font-size: 0.85rem; width: 100%; }

/* --- Workspace & Scrolling --- */
#workspace { flex: 1; display: grid; grid-template-columns: 260px 1fr 300px; height: calc(100vh - 110px); overflow: hidden; }
.panel, #middle-column { display: flex; flex-direction: column; background: var(--panel-bg); border-right: 1px solid var(--border); height: 100%; overflow: hidden; }
.panel-body { flex: 1; overflow-y: auto !important; padding: 15px; display: flex; flex-direction: column; }

/* --- UI Elements --- */
.panel-header { padding: 12px 15px; background: #f8fafc; font-size: 0.75rem; font-weight: 800; color: var(--primary); border-bottom: 1px solid var(--border); text-transform: uppercase; flex-shrink: 0; }
.history-item-btn { text-align: left; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: white; cursor: pointer; width: 100%; font-size: 13px; margin-bottom: 8px; }
.history-item-btn:hover { border-color: var(--primary); background: #f0f9ff; }

/* --- Input Area --- */
#question-area { padding: 15px; background: white; border-bottom: 1px solid var(--border); flex-shrink: 0; }
textarea { width: 100%; height: 80px; border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-size: 14px; background: #f8fafc; resize: none; }
.btn-send { background: var(--primary); color: white; border: none; padding: 10px; border-radius: 8px; cursor: pointer; font-weight: bold; width: 100%; margin-top: 8px; }

/* --- Sidebar & Status --- */
.sidebar-login-box { padding: 15px; background: #f8fafc; border-top: 1px solid var(--border); flex-shrink: 0; }
.btn-small { background: var(--primary); color: white; border: none; padding: 8px; border-radius: 6px; cursor: pointer; font-weight: bold; width: 100%; }
.btn-primary-outline { width: 100%; padding: 8px; border: 1px dashed #cbd5e1; background: none; border-radius: 8px; cursor: pointer; margin-bottom: 10px; color: var(--text-muted); }

#status-bar { height: 35px; background: #fff; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; padding: 0 20px; font-size: 11px; flex-shrink: 0; }
.status-link { color: var(--primary); text-decoration: none; font-weight: bold; }

/* --- Admin Scroller --- */
.admin-scroller { background: #f8fafc; border: 2px solid var(--primary); border-radius: 12px; padding: 10px; margin-top: 10px; }
.wisdom-card { border: 1px solid var(--border); border-radius: 12px; padding: 15px; margin-bottom: 15px; }
.wisdom-card.highlight { background: #f0f9ff; border-color: var(--primary); }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

/* --- Enhanced Readability & Font Sizes --- */
#canvas-content {
    font-size: 1.1rem; /* Larger, more comfortable reading size */
    line-height: 1.6;   /* Better spacing between lines */
    color: #1e293b;
}

/* --- The "Copy" Button Styling --- */
.copy-btn {
    display: block;
    margin-top: 20px;
    padding: 8px 16px;
    background: #f1f5f9;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    width: fit-content; /* Don't let it take the whole width */
}

.copy-btn:hover {
    background: var(--primary);
    color: white;
}

/* --- Emphasized Labels --- */
.nav-label, .panel-header {
    letter-spacing: 0.05em;
    font-size: 0.8rem; /* Slightly larger labels */
}