@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;600;700&display=swap');

:root {
    --profmat-blue: #3f87a6;
    --profmat-blue-dark: #2e647d;
    --profmat-green-soft: #ebf8e1;
    --profmat-aqua-soft: #afe8e0;
    --profmat-table-soft: #f0f7f9;
    --profmat-link: navy;
    --page-bg: #f0f0f0;
    --content-border: #e4e4e4;
}

html, body { min-height: 100%; }
body {
    margin: 0;
    background-color: var(--page-bg);
    color: #2e3c47;
    font-family: 'Exo 2', sans-serif;
}

a { color: var(--profmat-link); text-decoration: none; }
a:hover { text-decoration: underline; }

.profmat-page {
    width: min(1300px, calc(100% - 24px));
    margin: 16px auto 0;
}

.profmat-header {
    padding: 10px 30px;
    min-height: 120px;
    background: repeating-linear-gradient(90deg, var(--profmat-green-soft), var(--profmat-blue) 100%);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.profmat-brand {
    display: flex;
    align-items: center;
    gap: 30px;
    min-width: 0;
    color: #000;
}
.profmat-brand:hover { color: #000; text-decoration: none; }
.profmat-logo {
    width: 100px;
    height: auto;
    flex: 0 0 auto;
}
.profmat-title {
    font-size: 1.8rem;
    line-height: 1.15;
    font-weight: 700;
}
.profmat-title span {
    display: block;
    margin-top: .45rem;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: .015em;
}
.user-box {
    flex: 0 0 auto;
    max-width: 390px;
    color: #1f3540;
    line-height: 1.35;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .55rem;
}
.user-meta {
    min-width: 0;
    color: #153b4c;
}
.user-name {
    overflow-wrap: anywhere;
    color: #102f3d;
    font-weight: 700 !important;
}
.user-meta .small {
    color: #284f60;
    font-weight: 500;
}
.user-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .45rem;
}
.user-actions .btn {
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}
.header-action {
    border-width: 1px;
    box-shadow: 0 1px 2px rgba(16, 47, 61, .08);
}
.header-action-primary {
    color: #123b4e;
    background: #ffffff;
    border-color: #ffffff;
}
.header-action-primary:hover,
.header-action-primary:focus {
    color: #0b2b38;
    background: #eef8fa;
    border-color: #d8ebef;
}
.header-action-secondary {
    color: #183f4f;
    background: #e9f4f6;
    border-color: #d2e7eb;
}
.header-action-secondary:hover,
.header-action-secondary:focus {
    color: #0f303d;
    background: #dceef1;
    border-color: #c1dfe4;
}
.header-action-logout {
    color: #ffffff;
    background: #cf3448;
    border-color: #cf3448;
}
.header-action-logout:hover,
.header-action-logout:focus {
    color: #ffffff;
    background: #ad2638;
    border-color: #ad2638;
}

.profmat-content {
    padding: 24px 30px 40px;
    background: #fff;
    min-height: 680px;
    border-left: 1px solid var(--content-border);
    border-right: 1px solid var(--content-border);
}
.profmat-footer {
    padding: 14px 20px 22px;
    background: #fff;
    border: 1px solid var(--content-border);
    border-top: 0;
}

.eyebrow {
    color: var(--profmat-blue-dark);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .5rem;
}
.result-summary, .question-card { border-radius: 8px; overflow: hidden; }
.question-card { border-color: #dce5e8; }
.question-card .card-header {
    border-bottom: 1px solid #d9e7e8;
    background: var(--profmat-table-soft);
}
.grade-badge {
    background: var(--profmat-aqua-soft);
    color: #173f47;
    padding: .5rem .75rem;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
}
.grade-flow {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    flex-wrap: wrap;
}
.grade-arrow {
    color: #6c757d;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}
.grade-badge-changed {
    background: #cfe8d8;
    color: #185c34;
    border: 1px solid #a9d5b9;
}
.grade-badge-maintained {
    background: #fff3cd;
    color: #725a10;
    border: 1px solid #ffe69c;
}
.section-label {
    font-size: .78rem;
    color: #667;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
}
.preserve-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.metric-box {
    background: #f8faf9;
    border: 1px solid #dfe9e7;
    border-radius: 8px;
    padding: .9rem 1rem;
    height: 100%;
}
.metric-box span {
    display: block;
    color: #667;
    font-size: .78rem;
    text-transform: uppercase;
}
.metric-box strong {
    display: block;
    color: var(--profmat-blue-dark);
    font-size: 1.25rem;
    margin-top: .2rem;
}
.status-pill {
    display: inline-flex;
    padding: .42rem .7rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
}
.status-presente { background: #e8f5ee; color: #17633a; }
.status-ausente { background: #fff2d9; color: #7b5510; }
.status-eliminado { background: #fce9e9; color: #8a2525; }
.appeal-box {
    border-left: 4px solid var(--profmat-blue);
    background: #f5fafb;
    padding: 1rem 1.15rem;
    border-radius: 0 7px 7px 0;
}
.appeal-response {
    border-left: 4px solid #39744f;
    background: #f2f8f4;
    padding: 1rem 1.15rem;
    border-radius: 0 7px 7px 0;
}
.internal-note {
    border: 1px solid #e4b443;
    background: #fff8e7;
    color: #694d10;
    border-radius: 7px;
    padding: .9rem 1rem;
}
.login-card {
    max-width: 520px;
    margin: 2rem auto 3rem;
    border: 1px solid #dfe5e6;
    border-radius: 8px;
}
.form-label { color: #667; }
.form-control:focus, .form-select:focus {
    border-color: var(--profmat-blue);
    box-shadow: 0 0 0 .25rem rgba(63, 135, 166, .18);
}
.table thead th {
    background: var(--profmat-table-soft);
    color: #4f626d;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.table td { vertical-align: middle; }
.btn-primary {
    background-color: var(--profmat-blue);
    border-color: var(--profmat-blue);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--profmat-blue-dark);
    border-color: var(--profmat-blue-dark);
}
.btn-outline-primary {
    color: var(--profmat-blue-dark);
    border-color: var(--profmat-blue);
}
.btn-outline-primary:hover {
    background-color: var(--profmat-blue);
    border-color: var(--profmat-blue);
}
.admin-toolbar {
    background: #fff;
    border: 1px solid #e3e8e9;
    border-radius: 8px;
    padding: 1rem;
}

@media (max-width: 767.98px) {
    .profmat-page { width: 100%; margin-top: 0; }
    .profmat-header { padding: 10px 15px; min-height: 88px; gap: 14px; }
    .profmat-brand { gap: 14px; }
    .profmat-logo { width: 68px; }
    .profmat-title { font-size: 1.1rem; line-height: 1.2; }
    .profmat-title span { font-size: .86rem; }
    .profmat-content { padding: 18px 14px 30px; border-left: 0; border-right: 0; }
    .profmat-footer { border-left: 0; border-right: 0; }
    .profmat-header { flex-wrap: wrap; }
    .profmat-brand { width: 100%; }
    .user-box {
        width: 100%;
        max-width: none;
        padding-top: .65rem;
        border-top: 1px solid rgba(46, 100, 125, .22);
        align-items: stretch;
    }
    .user-meta { text-align: left !important; }
    .user-actions { justify-content: flex-start; }
}
