:root {
    --primary-color: #594F4F;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #333;
    --border-radius: 8px;
    
    /* Chat specific */
    --user-msg-bg: #d9fdd3;
    --bot-msg-bg: #ffffff;
    --timestamp-color: #999;

    /* Form specific */
    --input-border: #ccc;
    --input-bg: #fff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    color: var(--text-color);
}

/* Header Branding (Shared by chats.html and entrenar.html) */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    z-index: 10;
    max-height: 35px;
}

.brand-container {
    display: flex;
    align-items: center;
}

header img {
    height: 40px;
    margin-right: 15px;
    border-radius: 4px;
}

header h1 {
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
}

header h2 {
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
    opacity: 0.9;
}

.nav-btn {
    background: none;
    border: 3px solid rgba(255, 255, 255, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 10px;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

footer {
    text-align: center;
    padding: 1rem;
    color: #888;
    font-size: 0.8rem;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
    background-color: #f9f9f9;
    max-height: 15px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 250px;
    max-width: 350px;
    margin-bottom: 10px;
    padding: 16px;
    border-radius: 4px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toast.show {
    opacity: 1;
}

.toast-success {
    background-color: #2e7d32; /* Green */
}

.toast-error {
    background-color: #d32f2f; /* Red */
}

.toast-info {
    background-color: #0288d1; /* Blue */
}

/* Toggle Switch */
.toggle-wrapper {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 8px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2e7d32; /* Green for active */
}

input:focus + .slider {
    box-shadow: 0 0 1px #2e7d32;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 0.9rem;
    color: white;
    cursor: pointer;
    padding-right: 10px;
}

/* Small Toggle Switch Modifier */
.toggle-switch.small {
    width: 40px;
    height: 20px;
}

.toggle-switch.small .slider:before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
}

.toggle-switch.small input:checked + .slider:before {
    transform: translateX(20px);
}


/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: translateY(-20px);
    transition: transform 0.3s;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-title {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.modal-body {
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background-color: #e0e0e0;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #d0d0d0;
}
