/* AI Agents Platform - Frontend Styles */
/* Inspired by DataMind AI Corporate Design */

:root {
    --primary-color: #4eb478;
    --primary-dark: #45a36c;
    --primary-hover: #72c393;
    --primary-light: #6bc08e;
    --secondary-color: #a3ff00;
    --success-color: #4eb478;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #000000;
    --light-bg: #f4f4f4;
    --section-bg: #fafdfb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #232323;
    --text-secondary: #444444;
    --text-muted: #777777;
    --shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 0 30px rgba(214, 215, 216, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Roboto", sans-serif;
    background-color: #0a0a0a;
    color: var(--text-secondary);
    line-height: 1.625;
    font-size: 16px;
    font-weight: 300;
    position: relative;
}

/* Fondo muy tenue con overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/images/datamind-network-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: -1;
}

/* Optimización: Usar scroll en móviles para mejor rendimiento */
@media (max-width: 768px) {
    body::before {
        background-attachment: scroll;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Roboto", sans-serif;
    color: #ffffff;
    font-weight: 700;
}

/* Títulos dentro de cards mantienen color oscuro */
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    color: var(--text-primary);
}

p {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    line-height: 26px;
    margin-bottom: 15px;
    opacity: 0.95;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease-in-out;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Compact Admin Panel and Usage Stats */
#adminPanel,
#usageStatsCard {
    padding: 0.75rem 1rem !important;
    margin-bottom: 1rem !important;
}

#adminPanel h2,
#usageStatsCard h3 {
    font-size: 1rem !important;
    margin: 0 !important;
}

#adminPanel h3 {
    font-size: 0.875rem !important;
    margin: 0 0 0.25rem 0 !important;
}

#adminPanel p {
    font-size: 0.75rem !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

#adminPanel > div:first-child {
    margin-bottom: 0.5rem !important;
}

#adminPanel .btn {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.75rem !important;
}

#usageStatsCard > div:first-child {
    margin-bottom: 0.5rem !important;
}

#usageStatsCard .btn-small {
    padding: 0.3rem 0.7rem !important;
    font-size: 0.75rem !important;
}

#usageStatsCard > div:nth-child(2) {
    gap: 1rem !important;
}

#usageStatsCard > div:nth-child(2) > div {
    padding: 0.6rem 0.8rem !important;
}

#usageStatsCard > div:nth-child(2) > div span {
    font-size: 0.75rem !important;
}

#usageStatsCard > div:nth-child(2) > div > div:first-child {
    margin-bottom: 0.4rem !important;
}

#usageStatsCard > div:nth-child(2) > div > div:last-child {
    height: 6px !important;
}

#usageStatsCard > div:nth-child(2) > div > div:last-child > div {
    height: 100% !important;
}

#adminPanel > div:last-child {
    padding: 0.6rem 0.8rem !important;
}

#adminPanel #registrationStatus {
    font-size: 0.75rem !important;
}

@media (max-width: 768px) {
    #usageStatsCard > div:nth-child(2) {
        grid-template-columns: 1fr !important;
    }
}

/* Header */
.header {
    background: var(--dark-bg);
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);
    padding: 0;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 997;
    transition: all 0.5s;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo h1 {
    font-size: 28px;
    margin: 0;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 2px;
}

.logo h1 a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo h1 a:hover {
    color: #fff;
    text-decoration: none;
}

.logo img {
    padding: 0;
    margin: 0;
    max-height: 40px;
    vertical-align: middle;
}

/* Estilos específicos para el texto del logo DataMind */
.logo span {
    letter-spacing: 0.5px;
}

/* Estilos para los spans internos */
.logo span span {
    /* El font-family viene de los estilos inline en el HTML */
}

/* Estilos para el texto "Data" (blanco) */
.logo span span[style*="color: white"],
.logo span span[style*="color:white"] {
    font-weight: 600;
}

/* Estilos para el texto "Mind" con color neón verde */
.logo span span[style*="color: #a3ff00"],
.logo span span[style*="color:#a3ff00"] {
    font-weight: 600;
    text-shadow: 0 0 5px rgba(163, 255, 0, 0.5);
}

/* Estilos para el texto "AI" */
.logo span span[style*="font-weight: 300"],
.logo span span[style*="font-weight:300"] {
    font-weight: 300;
    letter-spacing: 1px;
    margin-left: 2px;
}

/* Responsive logo */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 20px;
    }

    .logo img {
        max-height: 30px;
    }
}

.nav {
    display: flex;
    gap: 0;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav a {
    color: #fff;
    text-decoration: none;
    padding: 25px 20px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    height: 70px;
}

.nav a:hover {
    color: var(--primary-hover);
}

/* Buttons */
.btn {
    font-family: "Raleway", sans-serif;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 1px;
    padding: 10px 28px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: #fff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-success {
    background-color: var(--success-color);
    color: #fff;
}

.btn-danger {
    background-color: var(--danger-color);
    color: #fff;
}

.btn-outline {
    background-color: #fff;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background-color: var(--text-secondary);
    border: 2px solid var(--text-secondary);
    color: #fff;
}

.btn-header-back {
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 8px 20px;
    font-size: 14px;
    font-family: "Raleway", sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-header-back:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

.btn-small {
    padding: 8px 20px;
    font-size: 14px;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 5px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 1.5rem;
    border: 0;
    transition: 0.3s;
    overflow: hidden;
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

.card-header {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0;
    color: var(--text-primary);
    font-family: "Raleway", sans-serif;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(78, 180, 120, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--primary-color);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

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

/* Fullscreen Pages */
.fullscreen-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--light-bg);
    z-index: 1000;
    overflow-y: auto;
}

.fullscreen-page.active {
    display: block;
}

.fullscreen-page-header {
    background: var(--dark-bg);
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);
    padding: 0;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 997;
    transition: all 0.5s;
}

.fullscreen-page-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 70px;
}

.fullscreen-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: "Raleway", sans-serif;
    color: #fff;
    flex: 1;
}

.fullscreen-page-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem 2rem 1rem;
}

/* Agent Form Layout */
.agent-form-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    min-height: calc(100vh - 160px);
}

.agent-form-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

.agent-form-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.agent-form-right::-webkit-scrollbar {
    width: 6px;
}

.agent-form-right::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 3px;
}

.agent-form-right::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 3px;
}

.agent-prompt-full {
    flex: 1;
    min-height: 300px;
    resize: vertical;
}

.agent-form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* API Key Status */
.api-key-status {
    margin-top: 0.5rem;
}

.api-key-saved {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--success-color);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Public Chat - White Label Interface */
.public-chat-body {
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    height: 100vh;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.public-chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: white;
}

.public-chat-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.25rem 2rem;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.public-chat-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-chat-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.public-chat-logo {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.public-chat-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.public-chat-clear-btn {
    background: white;
    border: 1px solid #e5e7eb;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.public-chat-clear-btn:hover {
    background: var(--light-bg);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.public-chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    scroll-behavior: smooth;
}

.public-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.public-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.public-chat-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.public-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.public-chat-welcome {
    text-align: center;
    padding: 6rem 2rem;
}

.public-chat-welcome-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.public-chat-welcome-text {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.public-chat-message {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    animation: messageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.public-chat-message-user {
    align-items: flex-end;
}

.public-chat-message-assistant {
    align-items: flex-start;
}

.public-chat-bubble {
    max-width: 65%;
    padding: 1rem 1.25rem;
    border-radius: 1.25rem;
    word-wrap: break-word;
    line-height: 1.6;
    font-size: 0.9375rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.public-chat-bubble strong {
    font-weight: 700;
}

.public-chat-bubble em {
    font-style: italic;
}

.public-chat-message-user .public-chat-bubble {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 0.375rem;
}

.public-chat-message-assistant .public-chat-bubble {
    background: #f3f4f6;
    color: var(--text-primary);
    border-bottom-left-radius: 0.375rem;
}

.public-chat-time {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    margin-top: 0.375rem;
    padding: 0 0.625rem;
    font-weight: 500;
}

.public-chat-typing {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem 0;
}

.public-chat-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: typing 1.4s infinite;
}

.public-chat-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.public-chat-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.public-chat-input-wrapper {
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem 2rem;
    background: white;
    flex-shrink: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.public-chat-input-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.public-chat-disclaimer {
    width: 100%;
    max-width: 1200px;
    margin: 0.75rem auto 0;
    text-align: center;
    font-size: 0.6875rem;
    color: #9ca3af;
    line-height: 1.4;
    padding: 0 1rem;
}

.public-chat-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 1.5rem;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
    resize: none;
    min-height: 52px;
    max-height: 150px;
    font-family: inherit;
    line-height: 1.5;
}

.public-chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.public-chat-input::placeholder {
    color: #9ca3af;
}

.public-chat-send-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.public-chat-send-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.public-chat-send-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.public-chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .public-chat-body {
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height - se ajusta cuando aparece el teclado */
        overflow: hidden;
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
    }

    .public-chat-wrapper {
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .public-chat-header {
        padding: 0.75rem 1rem;
        flex-shrink: 0;
        min-height: fit-content;
    }

    .public-chat-title {
        font-size: 1.125rem;
    }

    .public-chat-logo {
        height: 32px;
        max-width: 120px;
    }

    .public-chat-header-left {
        gap: 0.75rem;
    }

    .public-chat-clear-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .public-chat-clear-btn span {
        display: none;
    }

    .public-chat-messages {
        padding: 1rem 0.75rem;
        padding-bottom: 0.5rem;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
    }

    .public-chat-bubble {
        max-width: 85%;
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .public-chat-input-wrapper {
        padding: 0.75rem;
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
        box-sizing: border-box;
        flex-shrink: 0;
        width: 100%;
        margin: 0;
    }

    .public-chat-input-container {
        gap: 0.5rem;
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }

    .public-chat-disclaimer {
        font-size: 0.625rem;
        margin-top: 0.5rem;
        padding: 0;
        max-width: 100%;
    }

    .public-chat-input {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-height: 46px;
        width: 100%;
        box-sizing: border-box;
        border-radius: 1.25rem;
    }

    .public-chat-send-btn {
        width: 46px;
        height: 46px;
        flex-shrink: 0;
    }

    .public-chat-welcome {
        padding: 4rem 1.5rem;
    }

    .public-chat-welcome-icon {
        font-size: 3rem;
    }
}

/* Media query para pantallas muy pequeñas */
@media (max-width: 480px) {
    .public-chat-header {
        padding: 0.625rem 0.75rem;
    }

    .public-chat-title {
        font-size: 1rem;
    }

    .public-chat-messages {
        padding: 0.75rem 0.5rem;
        padding-bottom: 0.25rem;
    }

    .public-chat-bubble {
        max-width: 90%;
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }

    .public-chat-input-wrapper {
        padding: 0.5rem;
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }

    .public-chat-input-container {
        gap: 0.375rem;
    }

    .public-chat-input {
        padding: 0.625rem 0.875rem;
        font-size: 0.9375rem;
        border-radius: 1.125rem;
        min-height: 44px;
    }

    .public-chat-send-btn {
        width: 44px;
        height: 44px;
    }

    .public-chat-send-btn svg {
        width: 18px;
        height: 18px;
    }

    .public-chat-disclaimer {
        font-size: 0.5625rem;
        margin-top: 0.375rem;
    }
}

/* Old Chat Styles (deprecated) */
.chat-container {
    max-width: 800px;
    margin: 2rem auto;
}

.chat-messages {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    height: 500px;
    overflow-y: auto;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    max-width: 80%;
}

.message-user {
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
}

.message-assistant {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.message-timestamp {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
}

/* Agent Card */
.agent-card {
    border: 0;
    border-radius: 6px;
    padding: 30px 15px;
    background: #f7f7f7;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.agent-card:hover {
    box-shadow: var(--shadow);
    background: #fff;
    transform: translateY(-2px);
}

.agent-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-family: "Raleway", sans-serif;
    transition: 0.3s;
}

.agent-card:hover .agent-card-title {
    color: var(--primary-color);
}

.agent-card-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.agent-card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.agent-card-actions .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
}

/* Utility */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }

    .agent-card-actions {
        flex-direction: column;
    }

    .fullscreen-page-title {
        font-size: 1.25rem;
    }

    .fullscreen-page-content {
        padding: 0 0.5rem 2rem 0.5rem;
    }

    /* Agent form responsive */
    .agent-form-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .agent-form-right {
        overflow-y: visible;
        max-height: none;
    }

    .agent-prompt-full {
        min-height: 200px;
    }

    .agent-form-actions {
        margin-top: 1rem;
        padding-top: 1rem;
    }
}
