/* Plenus marca — fuente única (landing, autogestión, backoffice) */
@font-face {
    font-family: 'Gotham';
    src: url('../fonts/Gotham%20Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: 'Gotham';
    src: url('../fonts/Gotham%20Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Gotham';
    src: url('../fonts/Gotham%20Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Gotham';
    src: url('../fonts/Gotham%20Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}
@font-face {
    font-family: 'VAG Rounded';
    src: url('../fonts/VAG%20Rounded%20Std%20Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

:root {
    --color-brand-navy: #0c1730;
    --color-brand-primary: #064770;
    --color-brand-sky: #0f97d6;
    --color-text: #1a1a1a;
    --color-text-muted: #555;
    --color-text-light: #888;
    --color-bg: #fff;
    --color-bg-warm: #f4f6f1;
    --color-border: #e2e5df;
    --color-accent: #0ce9c6;
    --font-body: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'VAG Rounded', var(--font-body);
    --radius-sm: 8px;
    --radius-md: 16px;
    --shadow-soft: 0 4px 24px rgba(12, 23, 48, 0.06);
}

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

html {
    scroll-behavior: smooth;
}

body.ag-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg-warm);
    -webkit-font-smoothing: antialiased;
}

.ag-header {
    background: var(--color-brand-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 50;
}
.ag-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.875rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.ag-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
}
.ag-brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
.ag-brand-text {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
}
.ag-brand-text small {
    display: block;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-top: 0.15rem;
}
.ag-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1.25rem;
}
.ag-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.ag-nav a:hover {
    color: #fff;
    border-bottom-color: var(--color-accent);
}
.ag-nav a.ag-nav-exit {
    color: rgba(255, 200, 200, 0.95);
}
.ag-nav a.ag-nav-exit:hover {
    border-bottom-color: rgba(255, 200, 200, 0.8);
}
.ag-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}
.ag-footer {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem 2rem;
    text-align: center;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-light);
}
.ag-h1 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 1.75rem;
    color: var(--color-brand-navy);
    margin: 0 0 0.5rem;
    line-height: 1.25;
}
.ag-h2 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 1.25rem;
    color: var(--color-brand-navy);
    margin: 0 0 0.75rem;
}
.ag-lead {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
    max-width: 42rem;
}
.ag-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-soft);
}
.ag-card-narrow {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.ag-form-group {
    margin-bottom: 1.1rem;
}
.ag-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 0.35rem;
}
.ag-input,
.ag-select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
}
.ag-input:focus,
.ag-select:focus {
    outline: none;
    border-color: var(--color-brand-sky);
    box-shadow: 0 0 0 3px rgba(15, 151, 214, 0.15);
}
.ag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.35rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.ag-btn:active {
    transform: scale(0.98);
}
.ag-btn-primary {
    background: var(--color-brand-primary);
    color: #fff;
    width: 100%;
}
.ag-btn-primary:hover {
    background: var(--color-brand-navy);
    box-shadow: 0 6px 20px rgba(6, 71, 112, 0.25);
}
.ag-btn-secondary {
    background: var(--color-brand-sky);
    color: #fff;
}
.ag-btn-secondary:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 20px rgba(15, 151, 214, 0.3);
}
.ag-btn-outline {
    background: transparent;
    color: var(--color-brand-primary);
    border: 1px solid var(--color-brand-primary);
}
.ag-btn-outline:hover {
    background: rgba(6, 71, 112, 0.06);
}
.ag-alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.ag-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.ag-alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}
.ag-grid-cards {
    display: grid;
    gap: 1rem;
    margin-bottom: 2.5rem;
}
@media (min-width: 640px) {
    .ag-grid-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}
.ag-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    box-shadow: var(--shadow-soft);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ag-card-link:hover {
    border-color: var(--color-brand-sky);
    box-shadow: 0 8px 28px rgba(12, 23, 48, 0.08);
}
.ag-card-link h2 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 1.05rem;
    color: var(--color-brand-navy);
    margin: 0 0 0.35rem;
}
.ag-card-link p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
.ag-list-divided {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ag-list-divided li {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
}
.ag-list-divided li:last-child {
    border-bottom: none;
}
.ag-table-wrap {
    overflow-x: auto;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}
.ag-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.ag-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--color-bg-warm);
    color: var(--color-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.65rem;
}
.ag-table td {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--color-border);
    vertical-align: top;
}
.ag-table-empty {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    padding: 1.5rem 1rem !important;
}
.ag-backlink {
    display: inline-block;
    margin-top: 1.75rem;
    font-size: 0.8rem;
    color: var(--color-brand-primary);
    text-decoration: none;
    font-weight: 500;
}
.ag-backlink:hover {
    text-decoration: underline;
}
.ag-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.ag-link-table {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-brand-primary);
    text-decoration: none;
    white-space: nowrap;
}
.ag-link-table:hover {
    text-decoration: underline;
}
.ag-study-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-soft);
}
.ag-study-row h3 {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 0.35rem;
    color: var(--color-brand-navy);
}
.ag-study-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin: 0;
}
.ag-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.ag-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (max-width: 639px) {
    .ag-nav {
        width: 100%;
        justify-content: flex-start;
    }
}

.ag-btn-inline {
    width: auto;
}
.ag-ul-lab {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}
.ag-ul-lab li {
    margin-bottom: 0.25rem;
}
.ag-sprite-hidden {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}
.ag-field-password {
    position: relative;
}
.ag-input-password {
    padding-right: 2.75rem;
}
.ag-toggle-pw {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.ag-toggle-pw:hover {
    background: rgba(6, 71, 112, 0.08);
    color: var(--color-brand-primary);
}
.ag-toggle-pw:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(15, 151, 214, 0.35);
}
.ag-toggle-pw-icon {
    display: block;
}
.ag-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--color-text-muted);
    cursor: pointer;
    margin: 0;
}
.ag-checkbox-row .ag-checkbox {
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-brand-primary);
}
.ag-remember-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    min-height: 2.25rem;
}
.ag-checkbox-row--remember {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 300;
    line-height: 1;
    color: var(--color-text-light);
}
.ag-checkbox-row--remember .ag-checkbox {
    margin: 0;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    min-height: 1rem;
    align-self: center;
    accent-color: var(--color-brand-primary);
}
.ag-remember-text {
    display: inline-flex;
    align-items: center;
    line-height: 1.25;
}
.ag-info-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.875rem;
    height: 1.875rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text-light);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    align-self: center;
}
.ag-info-trigger:hover {
    background: rgba(12, 23, 48, 0.06);
    color: var(--color-text-muted);
}
.ag-info-trigger:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(15, 151, 214, 0.3);
}
.ag-info-trigger-icon {
    display: block;
    vertical-align: middle;
}
.ag-dialog {
    width: calc(100% - 2rem);
    max-width: 22rem;
    margin: auto;
    padding: 0;
    border: none;
    border-radius: var(--radius-md);
    background: var(--color-bg);
    box-shadow: 0 16px 48px rgba(12, 23, 48, 0.2);
}
.ag-dialog::backdrop {
    background: rgba(12, 23, 48, 0.45);
}
.ag-dialog-box {
    padding: 1.35rem 1.5rem 1.5rem;
}
.ag-dialog-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 1.15rem;
    color: var(--color-brand-navy);
    margin: 0 0 0.75rem;
    line-height: 1.3;
}
.ag-dialog-text {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--color-text-muted);
}
.ag-dialog-close {
    width: 100%;
    margin: 0;
}

/* Modal autogestión (estudios, etc.) */
.ag-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}
.ag-modal.is-open {
    display: flex;
}
.ag-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 23, 48, 0.45);
    cursor: pointer;
}
.ag-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 28rem;
    max-height: min(90vh, 36rem);
    overflow-y: auto;
    margin: 0;
    padding: 1.25rem 1.35rem 1.35rem;
}
.ag-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border, rgba(6, 71, 112, 0.12));
}
.ag-modal-close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.ag-modal-close:hover {
    background: rgba(6, 71, 112, 0.08);
    color: var(--color-brand-primary);
}
.ag-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}
