body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}
.container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
}
.chat-header {
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}
.chat-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}
.settings-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}
.settings-toggle:hover {
    background: rgba(255,255,255,0.3);
}
.hidden-controls {
    display: none;
    padding: 20px;
    background-color: #f8f9fa;
    border-left: 1px solid #e9ecef;
    overflow-y: auto;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 95%;
    box-shadow: -6px 0 18px rgba(0,0,0,0.06);
    z-index: 30;
}
.hidden-controls.show {
    display: block;
}

/* When settings are open, give the main content space on the right */
.container.settings-open .chat-container,
.container.settings-open .message-input-container,
.container.settings-open .main-column {
    margin-right: 320px; /* matches the panel width */
}

/* Settings close button inside the right-side panel */
.settings-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 18px;
    line-height: 1;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    z-index: 40;
}
.settings-close:hover,
.settings-close:focus {
    background: rgba(0,0,0,0.06);
    color: #222;
    outline: none;
}
.hidden-controls {
    position: absolute; /* existing or planned rule for right-side panel */
    /* ... */
    padding-top: 28px; /* give space for the close button if needed */
}

.input-group {
    margin-bottom: 15px;
    margin-top: 20px;
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 13px;
}
input[type="text"], input[type="password"], textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}
.checkbox-group {
    margin-top: 10px;
    margin-bottom: 10px;
}
input[type="checkbox"] {
    margin-right: 8px;
}
.chat-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f8f9fa;
}
.message-input-container {
    padding: 20px;
    background-color: white;
    border-top: 1px solid #e9ecef;
    position: relative;
}
.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.message-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 16px;
    resize: none;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
    background-color: white;
}
.message-input:focus {
    border-color: #667eea;
}
.send-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    /* width: 40px; */
    height: 40px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.send-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.chat-message {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}
.user-message {
    justify-content: flex-end;
}
.bot-message {
    justify-content: flex-start;
}
.message-bubble {
    max-width: 70%;
    padding: 15px 20px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.4;
}
.user-bubble {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-bottom-right-radius: 6px;
}
.bot-bubble {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 6px;
    white-space: normal;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
}
.bot-bubble p {
    margin: 0 0 12px 0;
}
.bot-bubble p:last-child {
    margin-bottom: 0;
}
.bot-bubble .key-point {
    margin: 8px 0;
    color: #495057;
}
.bot-bubble .key-point strong {
    color: #667eea;
}
.bot-bubble .list-item {
    margin: 6px 0;
    padding-left: 8px;
    color: #495057;
}
.bot-bubble .bullet-point {
    margin: 4px 0;
    padding-left: 8px;
    color: #495057;
}
.bot-bubble .work-item {
    margin: 10px 0;
    padding: 8px 0;
    border-radius: 6px;
}
.bot-bubble .work-item hr {
    border: none;
    border-top: 2px solid #e9ecef;
    margin: 8px 0;
    border-radius: 1px;
}
.bot-bubble .tip-section {
    margin-top: 15px;
    padding: 8px 0;
    color: #6c757d;
    font-style: italic;
}
.bot-bubble .tip-section hr {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 8px 0 12px 0;
}
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin: 0 10px;
    flex-shrink: 0;
}
.user-avatar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}
.bot-avatar {
    background: linear-gradient(135deg, #36d1dc, #5b86e5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}
.loading {
    color: #667eea;
    font-style: italic;
}
.error {
    color: #dc3545;
    background-color: #f8d7da !important;
    border-color: #f5c6cb;
}
.typing-indicator {
    display: none;
    padding: 15px 20px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    max-width: 70%;
}
.typing-indicator.show {
    display: block;
}
.typing-dots {
    display: flex;
    gap: 4px;
}
.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #667eea;
    animation: typing 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}
small {
    font-size: 11px;
    color: #666;
}
small a {
    color: #667eea;
}

/* FAB Integration details styling */
.fab-integration {
    margin-top: 12px;
    background: #fff;
    border: 1px solid #e9ecef;
    padding: 10px 12px;
    border-radius: 8px;
}
.fab-integration > summary {
    font-weight: 700;
    cursor: pointer;
    outline: none;
    list-style: none;
    margin-bottom: 8px;
}
.fab-integration[open] {
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
.fab-list {
    margin: 0;
    padding-left: 16px;
    color: #333;
}
.fab-list li {
    margin: 6px 0;
    font-size: 13px;
}

/* Azure DevOps Integration styling (matches FAB Integration) */
.devops-integration {
    margin-top: 12px;
    background: #fff;
    border: 1px solid #e9ecef;
    padding: 10px 12px;
    border-radius: 8px;
}
.devops-integration > summary {
    font-weight: 700;
    cursor: pointer;
    outline: none;
    list-style: none;
    margin-bottom: 8px;
}
.devops-integration[open] {
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.jira-integration {
    margin-top: 12px;
    background: #fff;
    border: 1px solid #e9ecef;
    padding: 10px 12px;
    border-radius: 8px;
}
.jira-integration > summary {
    font-weight: 700;
    cursor: pointer;
    outline: none;
    list-style: none;
    margin-bottom: 8px;
}
.jira-integration[open] {
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.input-group select {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

/* AI Prompts styling */
.ai-prompts {
    margin-top: 14px;
    background: #fff;
    border: 1px solid #e9ecef;
    padding: 12px;
    border-radius: 8px;
}
.ai-prompts > summary {
    font-weight: 700;
}
.saved-prompt button {
    background: transparent;
    border: 1px solid #dfe3e8;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}
.saved-prompt button:hover { background: #f1f3f5; }

/* In AI prompts area, make action buttons size to content (override circular send-button) */
.ai-prompts .send-button {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* small responsive tweak (optional) */
@media (max-width: 900px) {
    .hidden-controls {
        width: 100%;
        position: relative;
        box-shadow: none;
        border-left: none;
        border-top: 1px solid #e9ecef;
    }
    .container.settings-open .chat-container,
    .container.settings-open .message-input-container,
    .container.settings-open .main-column {
        margin-right: 0;
    }
}