/* Estilos globales del panel AIMCKenzie */

:root {
    --color-bg: #f5f5f5;
    --color-surface: #ffffff;
    --color-border: #e5e7eb;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-text: #111827;
    --color-text-muted: #4b5563;
    --color-topbar-bg: #111827;
    --color-topbar-text: #f9fafb;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

/* Topbar */

.topbar {
    background: var(--color-topbar-bg);
    color: var(--color-topbar-text);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.topbar__brand {
    font-size: 1rem;
    font-weight: 600;
}

.topbar__nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.topbar__nav a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.9rem;
}

.topbar__nav a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Layout principal */

.page {
    padding: 1.5rem;
}

.page__title {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
}

.page__subtitle {
    margin: 0 0 1.5rem 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* Tarjetas del dashboard */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.card {
    background: var(--color-surface);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid var(--color-border);
}

.card__title {
    margin: 0 0 0.35rem 0;
    font-size: 1rem;
}

.card__text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.card__actions {
    margin-top: 0.75rem;
}

.button {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    border-radius: 0.375rem;
    background: var(--color-primary);
    color: #ffffff;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

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

/* Enlaces simples */

.link {
    color: var(--color-primary);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Contenido centrado simple */

.section {
    max-width: 900px;
    margin: 0 auto;
}

/* Iframe a pantalla casi completa */

.fullframe-wrapper {
    margin-top: 1rem;
    background: #000;
}

.fullframe {
    width: 100%;
    height: calc(100vh - 72px); /* ocupa casi toda la pantalla menos la topbar */
    border: none;
    display: block;
}

/* Responsivo */

@media (max-width: 640px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}