/* Basic Clean Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: #ffffff;
    /* White Background */
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1 {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: #666;
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    background-color: #ffffff;
    /* White Background */
}

/* Cards */
.card,
.content-card {
    background: #3f51b5;
    /* Blue Background */
    color: white;
    /* White Text */
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 10px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    text-align: center;
}

.card {
    max-width: 400px;
}

.content-card {
    margin-top: 2rem;
}

.card h1,
.content-card h1,
.content-card h2 {
    color: white;
}

.card p,
.content-card p {
    color: #e0e0e0;
}

/* Logo */
.logo {
    max-width: 200px;
    margin-bottom: 2rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    /* Optional: Add a white filter or background if logo is dark */
    background: white;
    padding: 10px;
    border-radius: 8px;
}

/* Header/Nav */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

.header-logo {
    height: 50px;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #e0e0e0;
    /* Light text for labels on blue card */
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
    color: #333;
    /* Dark text in inputs */
    appearance: none;
}

input:focus,
select:focus {
    border-color: #7986cb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(197, 202, 233, 0.5);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #3f51b5;
    /* Blue text */
    background-color: white;
    /* White button */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.1s;
    width: 100%;
}

.btn:hover {
    background-color: #f5f5f5;
}

.btn:active {
    transform: translateY(1px);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-danger {
    background-color: #fff;
    color: #e53935;
    border: 1px solid #ffebee;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    width: auto;
}

.btn-danger:hover {
    background-color: #ffebee;
}

/* Alerts/Flash Messages */
.alert {
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: left;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.alert-info {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

/* Utilities */
.spacer {
    height: 2rem;
}

.separator {
    height: 1px;
    background-color: #eee;
    margin: 2rem 0;
}

/* ---------------- AI Chat ---------------- */
.ai-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #3f51b5;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 1000;
    font-size: 30px;
}

.ai-fab:hover {
    transform: scale(1.1);
}

.ai-modal {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    border: 1px solid #eee;
    animation: slideIn 0.3s ease-out;
}

.ai-modal.hidden {
    display: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-modal-header {
    background: #3f51b5;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: white;
    /* Force white text */
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.ai-modal-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
}

.chat-message {
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.4;
}

.bot-message {
    background: #fff;
    border: 1px solid #eee;
    align-self: flex-start;
    color: #333;
}

.user-message {
    background: #e8eaf6;
    color: #3f51b5;
    align-self: flex-end;
    margin-left: auto;
}

.loading {
    font-style: italic;
    color: #888;
}

.error {
    color: #d32f2f;
    border-color: #ffcdd2;
}

.pre-commands {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.pre-cmd-btn {
    background: white;
    border: 1px solid #3f51b5;
    color: #3f51b5;
    padding: 8px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.pre-cmd-btn:hover {
    background: #e8eaf6;
}

.ai-modal-footer {
    padding: 10px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background: white;
}

#chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    color: #333;
}

.send-btn {
    width: 40px;
    /* Specific width */
    padding: 0;
    /* Clear padding */
    display: flex;
    /* Centering content */
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}