/* Crescent AI Styles - V0.app Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

:root {
    /* Keep original Crescent Energy brand colors */
    --primary-color: #1e3a5f;
    --secondary-color: #2d5a8c;
    --accent-color: #4a90e2;

    /* Updated colors for V0.app design */
    --bg-gradient-start: #f8fafc;
    --bg-gradient-via: rgb(239 246 255 / 40%);
    --bg-gradient-end: #f8fafc;
    --text-color: #0f172a;
    --text-secondary: #64748b;
    --border-color: #cbd5e1;
    --sidebar-bg: #ffffff;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1);

    /* Message colors */
    --message-user-bg: #e3f2fd;
    --message-user-text: #1565c0;
    --message-user-label: #4a90e2;
    --message-assistant-bg: #fff;

    /* Capability card colors */
    --card-blue-from: rgb(59 130 246 / 10%);
    --card-blue-to: rgb(6 182 212 / 10%);
    --card-blue-border: rgb(148 163 184 / 80%);
    --card-blue-icon: #2563eb;

    --card-green-from: rgb(16 185 129 / 10%);
    --card-green-to: rgb(20 184 166 / 10%);
    --card-green-border: rgb(148 163 184 / 80%);
    --card-green-icon: #059669;

    --card-purple-from: rgb(139 92 246 / 10%);
    --card-purple-to: rgb(168 85 247 / 10%);
    --card-purple-border: rgb(148 163 184 / 80%);
    --card-purple-icon: #7c3aed;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-via) 50%, var(--bg-gradient-end) 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    margin-top: 0;
    padding-top: 0;
}

select {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif !important;
}

option {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 400 !important;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    margin-top: 0;
    padding-top: 0;
}

/* ============================================
   SIDEBAR STYLES
   ============================================ */

.sidebar {
    width: 288px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sidebar.hidden {
    transform: translateX(-100%);
}

/* New Chat Button */
.sidebar-new-chat {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

#new-conversation-btn {
    width: 100%;
    padding: 8px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: opacity 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#new-conversation-btn:hover {
    opacity: 0.9;
}

#new-conversation-btn svg {
    width: 14px;
    height: 14px;
}

/* Search Conversations */
.sidebar-search {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    width: 16px;
    height: 16px;
}

#search-conversations {
    width: 100%;
    padding: 10px 12px 10px 36px;
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    font-family: inherit;
    color: #1e293b;
}

#search-conversations::placeholder {
    color: #475569;
}

#search-conversations:focus {
    outline: none;
    background: white;
    border-color: var(--accent-color);
}

#search-conversations:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Conversations List */
.conversation-list-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.conversation-list-header {
    padding: 8px 8px 4px 8px;
    margin-bottom: 8px;
}

.conversation-list-header h3 {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.conversation-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conversation-item {
    position: relative;
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: var(--card-shadow);
}

.conversation-item:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    box-shadow: var(--card-shadow-hover);
}

.conversation-item.active {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.conversation-item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
    padding-right: 32px;
}

.conversation-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.conversation-item:hover .conversation-item-title {
    color: var(--accent-color);
}

.conversation-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.conversation-item-bot {
    color: var(--accent-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.conversation-item-bot svg {
    flex-shrink: 0;
}

.conversation-item-bot .bot-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: lowercase;
    color: var(--accent-color);
    opacity: 0.8;
}

.conversation-item-meta > span:last-child {
    color: #94a3b8;
    font-size: 10px;
}

/* Conversation Action Buttons */
.conversation-actions {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 28px;
}

.conversation-edit-btn,
.conversation-delete-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.conversation-item:hover .conversation-edit-btn,
.conversation-item:hover .conversation-delete-btn {
    opacity: 1;
}

.conversation-edit-btn {
    color: #64748b;
}

.conversation-edit-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--accent-color);
}

.conversation-delete-btn {
    color: #ef4444;
}

.conversation-delete-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
}

.conversation-title-input {
    font-weight: 500;
    font-size: 14px;
    width: 100%;
    padding: 4px 8px;
    border: 2px solid var(--accent-color);
    border-radius: 4px;
    font-family: inherit;
    background: white;
    color: var(--text-color);
}

.conversation-title-input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* User Profile */
.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px;
    background: white;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.user-status {
    font-size: 12px;
    color: #64748b;
}

.user-menu-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #94a3b8;
    transition: all 0.2s;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu-btn:hover {
    background: #f1f5f9;
    color: var(--text-color);
}

.user-menu-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 192px;
    z-index: 1000;
    overflow: hidden;
}

.user-menu-dropdown.hidden {
    display: none;
}

.menu-item {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    font-family: inherit;
}

.menu-item:hover {
    background: #f8fafc;
}

.menu-item-danger {
    color: #dc2626;
}

.menu-item-danger:hover {
    background: #fef2f2;
}

.menu-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ============================================
   HEADER STYLES
   ============================================ */

header {
    background: #1193d4;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    height: 40px;
    margin-top: 0;
    padding-top: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

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

.header-left a {
    cursor: pointer;
    transition: opacity 0.2s;
}

.header-left a:hover {
    opacity: 0.85;
}

.sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

.header-icon {
    height: 28px;
    width: 28px;
    object-fit: contain;
}

.header-logo {
    height: 28px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.header-divider {
    width: 1px;
    height: 24px;
    background: rgba(59, 130, 246, 0.3);
}

header h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.02em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#bot-select {
    padding: 4px 10px;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#bot-select:focus {
    outline: none;
    border-color: var(--accent-color);
}


.header-icons {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 4px;
}

.header-icon-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon-btn:hover:not(:disabled) {
    background: rgba(96, 165, 250, 0.5);
    color: white;
}

.header-icon-btn:disabled {
    opacity: 1;
    cursor: not-allowed;
}

/* ============================================
   MAIN CONTENT & CHAT CONTAINER
   ============================================ */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    background: white;
    padding: 24px 24px 24px 48px;
}

/* Welcome Message - matches V0.app structure */
.welcome-message {
    max-width: 1024px;
    margin: 0 auto;
    padding: 48px 24px 96px 24px;
}

.welcome-header {
    text-align: center;
    margin-bottom: 48px;
}

.welcome-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 18px;
    color: #64748b;
    line-height: 1.6;
}

/* Capability Cards - exactly matching V0.app grid */
.capabilities {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.capability-card {
    position: relative;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* No background fallback - let specific classes define backgrounds */
}

.capability-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.capability-card:hover::before {
    opacity: 1;
}

.capability-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.capability-card-blue {
    background: linear-gradient(to bottom right, rgba(59, 130, 246, 0.15), rgba(147, 197, 253, 0.15));
    border-color: #cbd5e1;
}

.capability-card-blue:hover {
    border-color: #60a5fa;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

.capability-card-green {
    background: linear-gradient(to bottom right, rgba(16, 185, 129, 0.15), rgba(110, 231, 183, 0.15));
    border-color: #cbd5e1;
}

.capability-card-green:hover {
    border-color: #4ade80;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.15);
}

.capability-card-purple {
    background: linear-gradient(to bottom right, rgba(139, 92, 246, 0.15), rgba(196, 181, 253, 0.15));
    border-color: #cbd5e1;
}

.capability-card-purple:hover {
    border-color: #a78bfa;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
}

.capability-card-orange {
    background: linear-gradient(to bottom right, rgba(245, 124, 0, 0.15), rgba(255, 152, 0, 0.15));
    border-color: #cbd5e1;
}

.capability-card-orange:hover {
    border-color: #ff9800;
    box-shadow: 0 10px 30px rgba(245, 124, 0, 0.15);
}

.capability-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: transform 0.3s;
}

.capability-card:hover .capability-icon-wrapper {
    transform: scale(1.1);
}

.capability-card-blue .capability-icon {
    color: var(--card-blue-icon);
}

.capability-card-green .capability-icon {
    color: var(--card-green-icon);
}

.capability-card-purple .capability-icon {
    color: var(--card-purple-icon);
}

.capability-card-orange .capability-icon {
    color: #f57c00;
}

.capability-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.capability-card p {
    font-size: 14px;
    color: #64748b;
}

/* Quick Tips */
.quick-tips {
    padding: 24px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.quick-tips h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.quick-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-tips li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
}

.quick-tips li span {
    color: var(--accent-color);
    margin-top: 2px;
    flex-shrink: 0;
}

/* Available Bots Section */
.available-bots {
    padding: 24px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-top: 24px;
}

.available-bots h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.current-bot-note {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.6;
}

.current-bot-note strong {
    color: var(--primary-color);
    font-weight: 600;
}

.bot-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bot-item {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.bot-item:hover {
    background: #e8edf2;
    border-left-color: var(--primary-color);
    transform: translateX(2px);
}

.bot-item strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Messages */
.message {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    width: 100%;
}

.message.user {
    justify-content: flex-end;
    margin-top: 1rem;
}

.message.assistant {
    justify-content: flex-start;
}

.message-content {
    width: 85%;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    word-wrap: break-word;
    line-height: 1.6;
    font-size: 0.9rem;
}

.message.user .message-content {
    width: 42.5%;
    background: var(--message-user-bg);
    color: var(--message-user-text);
    border-bottom-right-radius: 4px;
    border: 1px solid #bbdefb;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}

.message.assistant .message-content {
    background: var(--message-assistant-bg);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.message-role {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.message.user .message-role {
    color: var(--message-user-label);
    font-weight: 700;
}

.message.assistant .message-role {
    color: var(--primary-color);
}

.message-text {
    line-height: 1.6;
}

.typing-indicator {
    display: inline-block;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color);
    margin: 0 2px;
    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% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* ============================================
   INPUT AREA
   ============================================ */

.input-container {
    border-top: 1px solid #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.input-container > div {
    max-width: 1024px;
    margin: 0 auto;
    padding: 16px 24px;
}

.input-options {
    padding-bottom: 0;
    padding-top: 16px;
    margin-bottom: 12px;
}

.input-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.input-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    accent-color: #2563eb;
}

.input-options span {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    transition: color 0.2s;
}

.input-options label:hover span {
    color: #0f172a;
}

.input-wrapper {
    padding: 0 24px 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1024px;
    margin: 0 auto;
}

#user-input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    height: 52px;
    max-height: 150px;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    color: #0f172a;
}

#user-input::placeholder {
    color: #94a3b8;
}

#user-input:focus {
    outline: none;
    border-color: transparent;
    ring: 2px;
    ring-color: #3b82f6;
    box-shadow: 0 0 0 2px #3b82f6;
}

#attach-file-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

#attach-file-btn:hover {
    color: #64748b;
}

#send-button {
    width: 52px;
    height: 52px;
    min-width: 52px;
    background: #1e3a5f;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#send-button:hover {
    opacity: 0.9;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

#send-button span {
    font-size: 20px;
}

/* File Upload Section */
.file-upload-section {
    padding: 12px 24px;
    background: #f1f5f9;
    border-radius: 8px;
    margin: 0 24px 12px 24px;
    max-width: calc(1024px - 48px);
    margin-left: auto;
    margin-right: auto;
}

.attached-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
}

.file-chip-remove {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-chip-remove:hover {
    color: #dc2626;
}

/* ============================================
   LOADING SCREEN
   ============================================ */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    height: 120px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    margin-bottom: 24px;
    animation: pulse 2s ease-in-out infinite;
}

.loading-content h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

.loading-content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

.conversation-list-wrapper::-webkit-scrollbar,
.chat-container::-webkit-scrollbar {
    width: 8px;
}

.conversation-list-wrapper::-webkit-scrollbar-track,
.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.conversation-list-wrapper::-webkit-scrollbar-thumb,
.chat-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.conversation-list-wrapper::-webkit-scrollbar-thumb:hover,
.chat-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
    }

    .sidebar.hidden {
        transform: translateX(-100%);
    }

    .sidebar-toggle {
        display: block;
    }

    .header-content {
        padding: 0 16px;
    }

    header h1 {
        font-size: 20px;
    }

    .welcome-message {
        padding: 24px 16px;
    }

    .welcome-header h2 {
        font-size: 28px;
    }

    .capabilities {
        grid-template-columns: 1fr;
    }

    .input-wrapper {
        padding: 0 16px 16px 16px;
    }

    .message-content {
        width: 95%;
    }
}

/* ============================================
   MARKDOWN STYLING IN MESSAGES
   ============================================ */

.message.assistant .message-text h1,
.message.assistant .message-text h2,
.message.assistant .message-text h3,
.message.assistant .message-text h4 {
    color: var(--primary-color);
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.message.assistant .message-text h1 { font-size: 20px; }
.message.assistant .message-text h2 { font-size: 18px; }
.message.assistant .message-text h3 { font-size: 16px; }
.message.assistant .message-text h4 { font-size: 14px; }

.message.assistant .message-text h1:first-child,
.message.assistant .message-text h2:first-child,
.message.assistant .message-text h3:first-child {
    margin-top: 0;
}

.message.assistant .message-text p {
    margin-bottom: 16px;
}

.message.assistant .message-text ul,
.message.assistant .message-text ol {
    margin: 16px 0;
    padding-left: 24px;
}

.message.assistant .message-text li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.message.assistant .message-text strong {
    font-weight: 600;
    color: var(--primary-color);
}

.message.assistant .message-text code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #dc2626;
}

.message.assistant .message-text pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.message.assistant .message-text pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.message.assistant .message-text a {
    color: var(--accent-color);
    text-decoration: underline;
}

.message.assistant .message-text a:hover {
    color: var(--secondary-color);
}

.message.assistant .message-text table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
}

.message.assistant .message-text th,
.message.assistant .message-text td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

.message.assistant .message-text th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--primary-color);
}

.message.assistant .message-text hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 24px 0;
}

/* Export button styles */
.export-button {
    margin-top: 16px;
    padding: 8px 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.export-button:hover {
    background: var(--secondary-color);
}

.export-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Enhanced Bot Welcome Messages */
.bot-welcome-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
}

.bot-welcome-intro {
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.bot-welcome-intro h3 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bot-welcome-intro p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.bot-welcome-sections-row {
    display: flex;
    gap: 20px;
    width: 100%;
}

.bot-welcome-sections-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.bot-welcome-section {
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e8edf2;
    flex: 1;
}

.bot-welcome-section h4 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.bot-example-queries {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hr-how-it-works {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hr-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.step-content {
    flex: 1;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.step-content strong {
    color: var(--text-primary);
    display: inline;
}

.step-content a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.step-content a:hover {
    text-decoration: underline;
}

.step-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #334155;
}

.bot-example-item {
    padding: 8px 10px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #10b981;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s;
    cursor: pointer;
}

.bot-example-item:hover {
    background: #f0f9ff;
    border-left-color: var(--accent-color);
    color: var(--text-primary);
}

.example-icon {
    font-size: 15px;
    flex-shrink: 0;
}

.bot-capabilities {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bot-capability {
    padding: 7px 10px;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

/* Mermaid Chart Styling */
.mermaid-chart {
    background: white;
    padding: 40px 20px 20px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 16px 0;
    overflow-x: auto;
    overflow-y: visible;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mermaid-chart svg {
    max-width: 100%;
    height: auto;
    overflow: visible;
}

/* Mermaid chart text styling for better visibility */
.mermaid-chart svg text {
    fill: #1e293b !important;
    font-weight: 500 !important;
}

.mermaid-chart svg .titleText {
    fill: #0f172a !important;
    font-weight: 600 !important;
    font-size: 18px !important;
}

.mermaid-chart svg .xAxisLabel,
.mermaid-chart svg .yAxisLabel {
    fill: #334155 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

/* ============================================
   SELECTION MODE STYLES
   ============================================ */

/* Selection Action Bar */
.selection-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    margin: 0 8px 8px 8px;
    background: linear-gradient(135deg, #1193d4 0%, #0d7ab8 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    gap: 12px;
    flex-wrap: wrap;
}

.selection-action-bar.hidden {
    display: none;
}

.selection-actions-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

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

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: white;
    font-size: 12px;
    font-weight: 500;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: white;
}

.checkbox-label:hover {
    opacity: 0.9;
}

/* Selection Count */
.selection-count {
    color: white;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 10px;
}

/* Action Buttons */
.btn-secondary {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-danger {
    padding: 6px 14px;
    background: #ef4444;
    color: white;
    border: 1px solid #dc2626;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    border-color: #b91c1c;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Conversation Item Checkbox */
.conversation-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #1193d4;
    flex-shrink: 0;
}

/* Selection Mode - Hide Action Buttons */
.selection-mode .conversation-actions {
    display: none !important;
}

/* Selection Mode - Adjust Conversation Item Layout */
.selection-mode .conversation-item {
    display: flex;
    align-items: center;
    padding-left: 12px;
}

.selection-mode .conversation-item-content {
    flex: 1;
    cursor: pointer;
}

/* Conversation Item Selected State */
.conversation-item.selected {
    background: linear-gradient(135deg, rgba(255, 235, 59, 0.15) 0%, rgba(255, 193, 7, 0.15) 100%);
    border-left: 3px solid #ffc107;
}

.conversation-item.selected:hover {
    background: linear-gradient(135deg, rgba(255, 235, 59, 0.25) 0%, rgba(255, 193, 7, 0.25) 100%);
}
/* ========================================
   HR-BOT Tabbed Interface Styles
   ======================================== */

/* Tabs Container */
.hr-tabs-container {
    margin-top: 20px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: none;
}

/* Tabs Header */
.hr-tabs-header {
    display: flex;
    gap: 4px;
    background: #e9ecef;
    padding: 8px;
    border-radius: 12px;
}

.hr-tab-btn {
    flex: 1;
    padding: 14px 20px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.hr-tab-btn:hover {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.08) 0%, rgba(102, 153, 255, 0.08) 100%);
    color: #0066cc;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.15);
}

.hr-tab-btn.active {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
    transform: translateY(-2px);
}

.hr-tab-btn.active .tab-icon {
    transform: scale(1.1);
}

.hr-tab-btn .tab-icon {
    font-size: 18px;
}

.hr-tab-btn .tab-badge {
    padding: 3px 10px;
    background: #28a745;
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hr-tab-btn.active .tab-badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.hr-tab-btn .tab-badge.coming-soon {
    background: #6c757d;
}

.hr-tab-btn.active .tab-badge.coming-soon {
    background: rgba(255, 255, 255, 0.25);
}

/* Tab Content */
.hr-tab-content {
    padding: 24px 8px;
}

.hr-tab-pane {
    display: none;
}

.hr-tab-pane.active {
    display: block;
}

/* HR Features Grid (3 columns) */
.hr-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.hr-feature-card {
    padding: 12px 14px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
    transition: all 0.2s ease;
}

.hr-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #0066cc;
}

.hr-feature-card .feature-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.hr-feature-card .feature-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Future Skills Tab */
.future-skills-container {
    max-width: 100%;
}

.future-skills-header {
    text-align: center;
    margin-bottom: 24px;
}

.future-skills-header h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 18px;
}

.future-skills-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Future Skills Grid (3 columns, 2 rows) */
.future-skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.future-skill-item {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.future-skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05) 0%, rgba(102, 153, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.future-skill-item:hover::before {
    opacity: 1;
}

.future-skill-item:hover {
    border-color: #0066cc;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.15);
}

.future-skill-item .future-icon {
    font-size: 40px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.future-skill-item .future-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.future-skill-item .future-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* Future CTA */
.future-cta {
    padding: 16px 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
    border-left: 4px solid #0066cc;
    text-align: center;
}

.future-cta p {
    margin: 0;
    color: #1565c0;
    font-size: 14px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hr-features-grid,
    .future-skills-grid {
        grid-template-columns: 1fr;
    }
    
    .hr-tabs-header {
        flex-direction: column;
    }
    
    .hr-tab-btn {
        justify-content: flex-start;
        padding: 12px 16px;
    }
}
