/* LIGHT THEME - ENCI / Institutional Style */

body.light-theme {
    --primary: #2b5a9b; /* ENCI Blue */
    --primary-glow: rgba(43, 90, 155, 0.15);
    --secondary: #e65c27; /* Softer ENCI Orange */
    --accent: #0088cc; /* Light Blue */
    --bg-deep: #f5f6f8; /* Light gray/white background */
    --surface: #ffffff; /* Pure white panels */
    --surface-hover: rgba(43, 90, 155, 0.05);
    --border: #d0d7de; /* Solid light borders */
    --border-bright: #2b5a9b; /* Blue borders on focus */
    --text: #24292f; /* Dark gray for high readability */
    --text-dim: #57606a;
    --text-bright: #0969da;
    
    /* Institutional shapes: less rounded, solid shadows */
    --radius: 6px;
    --radius-sm: 4px;
}

body.light-theme .bg-overlay {
    display: none !important;
}

body.light-theme .glass {
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Typography & Layout overrides */
body.light-theme .chat-header {
    background: #ffffff;
    border-bottom: 2px solid #2b5a9b;
}

body.light-theme .header-title {
    color: #2b5a9b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.light-theme .main {
    background: #ffffff;
}

/* Left Sidebar overrides */
body.light-theme .sidebar {
    background: #f8f9fa;
    border-right: 1px solid var(--border);
}

body.light-theme .client-item {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

body.light-theme .client-item:hover {
    border-color: #2b5a9b;
}

body.light-theme .client-item.active {
    background: #2b5a9b;
    color: #ffffff;
    border-color: #1a3d6b;
}

body.light-theme .client-item.active .ci-name {
    color: #ffffff;
}

body.light-theme .client-item .ci-name {
    color: #2b5a9b;
    font-weight: 600;
}

body.light-theme .client-item .ci-meta {
    color: #57606a;
}

body.light-theme .client-item.active .ci-meta {
    color: #d0e1f9;
}

/* Right Sidebar (Workspace) overrides */
body.light-theme .cw-section {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

body.light-theme .cw-section-title {
    background: #2b5a9b;
    color: #ffffff;
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding: 10px 12px;
}

body.light-theme .cw-section-title.collapsible.collapsed {
    border-radius: var(--radius-sm);
}

body.light-theme .cw-name {
    color: #2b5a9b;
    font-weight: bold;
}

/* Chat Bubbles */
body.light-theme .msg-content {
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

body.light-theme .msg-user .msg-content {
    background: #eaf2fa;
    color: #24292f;
    border: 1px solid #b0c4de;
}

body.light-theme .msg-user .msg-avatar {
    background: #2b5a9b;
}

body.light-theme .msg-agent .msg-content {
    background: #ffffff;
    color: #24292f;
    border: 1px solid var(--border);
}

body.light-theme .msg-agent .msg-avatar {
    background: #e65c27;
    box-shadow: 0 0 10px rgba(230, 92, 39, 0.3);
}

body.light-theme .chat-input-container {
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
}

body.light-theme .chat-input textarea {
    color: #24292f;
}

body.light-theme .chat-input textarea::placeholder {
    color: #8c959f;
}

body.light-theme #send-btn {
    background: #e65c27; /* Softer orange */
    color: white;
    border-radius: var(--radius-sm);
    border: 1px solid #d04f1e;
}

body.light-theme #send-btn:hover:not(:disabled) {
    background: #d04f1e;
    box-shadow: 0 2px 8px rgba(230, 92, 39, 0.4);
}

body.light-theme pre {
    background: #f6f8fa;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: #24292f;
}

body.light-theme code {
    color: #0969da;
}

body.light-theme .msg-meta {
    color: #57606a;
}

body.light-theme .meta-tag {
    background: #eaf2fa;
    border: 1px solid #b0c4de;
    color: #2b5a9b;
}

body.light-theme .msg-content code {
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    color: #0969da;
}

body.light-theme .modal,
body.light-theme .nc-card {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body.light-theme #theme-toggle-btn {
    background: #eaf2fa !important;
    border: 1px solid #b0c4de !important;
    color: #2b5a9b !important;
}

body.light-theme #theme-toggle-btn:hover {
    background: #d0e1f9 !important;
}

body.light-theme #header-abort-btn {
    background: #fdf0f0 !important;
    border: 1px solid #f8c2c2 !important;
    color: #d93025 !important;
}


/* Modal Inputs & Buttons Overrides */
body.light-theme .nc-field input,
body.light-theme .nc-field textarea,
body.light-theme .client-search {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
}

body.light-theme .nc-field input::placeholder,
body.light-theme .nc-field textarea::placeholder,
body.light-theme .client-search::placeholder {
    color: #8c959f;
}

body.light-theme .nc-field input:focus,
body.light-theme .nc-field textarea:focus,
body.light-theme .client-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

body.light-theme .nc-btn {
    background: #f6f8fa;
    border: 1px solid var(--border);
    color: var(--text);
}

body.light-theme .nc-btn:hover {
    background: #eaf2fa;
    border-color: #b0c4de;
    color: var(--primary);
}

body.light-theme .nc-btn-primary {
    background: var(--primary) !important;
    color: #ffffff !important;
    border: 1px solid #1a3d6b !important;
}

body.light-theme .nc-btn-primary:hover {
    background: #1a3d6b !important;
}

/* Workspace (Right Sidebar) Specific Overrides */
body.light-theme .cw-tag {
    background: #eaf2fa;
    border: 1px solid #b0c4de;
    color: var(--primary);
}

body.light-theme .cw-file {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
}

body.light-theme .cw-file:hover {
    border-color: var(--primary);
    background: #f6f8fa;
}

body.light-theme .cw-add-file-btn {
    background: #eaf2fa;
    color: var(--primary);
}

body.light-theme .cw-add-file-btn:hover {
    background: #d0e1f9;
}

body.light-theme .cw-state-row .key {
    color: var(--text-dim);
}

body.light-theme .cw-state-row .val {
    color: var(--text);
    font-weight: 500;
}

body.light-theme .cw-log-event {
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

body.light-theme .cw-session-msg {
    color: var(--text);
}

/* Sidebar Right (Workspace panel) overrides */
body.light-theme .sidebar-right {
    background: #f8f9fa;
    border-left: 1px solid var(--border);
}

/* Thinking Box (Agent Reasoning) overrides */
body.light-theme .thinking-box {
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

body.light-theme .thinking-header {
    background: #eaf2fa;
    border-bottom: 1px solid var(--border);
    color: var(--primary);
}

body.light-theme .thinking-spinner {
    border-color: rgba(43, 90, 155, 0.2);
    border-top-color: var(--primary);
}

body.light-theme .thinking-logs {
    color: var(--text-dim);
}

body.light-theme .log-think {
    color: var(--primary);
}

body.light-theme .log-tool {
    color: var(--secondary);
}

body.light-theme .log-result {
    color: var(--text);
}
