:root {
    --aeqr-green: #174f49;
    --aeqr-green-dark: #103d38;
    --aeqr-sage: #edf6f3;
    --aeqr-gold: #c7a953;
    --aeqr-ink: #263d38;
    --aeqr-line: #d7e2de;
}

/* Capa visual premium para las notificaciones globales de Moodle. */
.popover-region-notifications .popover-region-toggle,.popover-region-messaging .popover-region-toggle{border:1px solid #d7e2de!important;border-radius:12px!important;background:#fff!important;color:#174f49!important;box-shadow:0 4px 12px rgba(23,59,54,.08);transition:all .18s ease}.popover-region-notifications .popover-region-toggle:hover,.popover-region-messaging .popover-region-toggle:hover{background:#eef8f5!important;border-color:#78a99b!important;transform:translateY(-1px)}.popover-region-notifications .count-container,.popover-region-messaging .count-container{background:#c75b55!important;color:#fff!important;border:2px solid #fff!important;border-radius:999px!important;font-weight:800!important;min-width:18px!important;height:18px!important;line-height:14px!important;box-shadow:0 2px 6px rgba(23,59,54,.2)}.popover-region-notifications .popover-region-container,.popover-region-messaging .popover-region-container{border:1px solid #d7e2de!important;border-radius:16px!important;box-shadow:0 18px 45px rgba(23,59,54,.16)!important;overflow:hidden;background:#fff!important}.popover-region-notifications .popover-region-header-container,.popover-region-messaging .popover-region-header-container{background:#eef8f5!important;border-bottom:1px solid #d7e2de!important;color:#174f49!important;font-weight:800!important}.popover-region-notifications .content-item-container,.popover-region-messaging .content-item-container{border-bottom:1px solid #edf2f0!important;padding:13px 16px!important;transition:background .18s ease}.popover-region-notifications .content-item-container:hover,.popover-region-messaging .content-item-container:hover{background:#f5fbf9!important}

.aeqr-report-button {
    align-items: center;
    background: #174f49 !important;
    border: 1px solid #174f49 !important;
    border-radius: 9px;
    color: #fff !important;
    cursor: pointer;
    display: flex;
    font-size: 12px;
    font-weight: 800;
    gap: 7px;
    line-height: 1.25;
    margin-top: 12px;
    padding: 7px 9px;
    text-align: left;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
    width: 100%;
}

.aeqr-report-button:hover,
.aeqr-report-button:focus-visible {
    background: #103d38 !important;
    border-color: var(--aeqr-gold);
    color: #fff !important;
    transform: translateY(-1px);
}

.aeqr-report-button__icon {
    align-items: center;
    background: #fff4d8;
    border: 1px solid #d7bf76;
    border-radius: 50%;
    color: #5b4612 !important;
    display: inline-flex;
    flex: 0 0 20px;
    font-size: 12px;
    height: 20px;
    justify-content: center;
}

.aeqr-report-button > span:last-child { color: #fff !important; opacity: 1 !important; display:inline !important; visibility:visible !important; }

.aeqr-dialog {
    background: transparent;
    border: 0;
    border-radius: 18px;
    color: var(--aeqr-ink);
    max-width: min(620px, calc(100vw - 28px));
    padding: 0;
    width: 100%;
}

.aeqr-dialog::backdrop {
    background: rgba(10, 34, 31, .52);
    backdrop-filter: blur(3px);
}

.aeqr-dialog__shell {
    background: #fff;
    border: 1px solid rgba(215, 226, 222, .9);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 46, 45, .2);
    overflow: hidden;
}

.aeqr-dialog__header {
    background: linear-gradient(145deg, #edf6f3, #f8fbfa);
    border-bottom: 1px solid var(--aeqr-line);
    padding: 24px 28px 20px;
}

.aeqr-dialog__brand {
    color: #7d692b;
    display: block;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
    margin-bottom: 8px;
}

.aeqr-dialog__title {
    color: var(--aeqr-green-dark);
    font-size: 24px;
    font-weight: 850;
    line-height: 1.15;
    margin: 0 0 7px;
}

.aeqr-dialog__question {
    color: #5b706a;
    font-size: 13px;
    font-weight: 700;
}

.aeqr-dialog__body {
    padding: 22px 28px 12px;
}

.aeqr-dialog__intro {
    color: #526660;
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 18px;
}

.aeqr-dialog__label {
    color: var(--aeqr-green-dark);
    display: block;
    font-size: 13px;
    font-weight: 800;
    margin: 14px 0 7px;
}

.aeqr-dialog__select,
.aeqr-dialog__textarea {
    background: #fff;
    border: 1px solid #cbd9d4;
    border-radius: 10px;
    color: var(--aeqr-ink);
    font: inherit;
    padding: 11px 12px;
    width: 100%;
}

.aeqr-dialog__select:focus,
.aeqr-dialog__textarea:focus {
    border-color: #6e9f91;
    box-shadow: 0 0 0 3px rgba(23, 79, 73, .1);
    outline: 0;
}

.aeqr-dialog__counter {
    color: #7a8b86;
    font-size: 11px;
    margin-top: 5px;
    text-align: right;
}

.aeqr-dialog__feedback {
    border-radius: 8px;
    font-size: 13px;
    margin-top: 10px;
    min-height: 20px;
    padding: 0;
}

.aeqr-dialog__feedback--error {
    background: #fbefee;
    color: #883f3a;
    padding: 9px 11px;
}

.aeqr-dialog__feedback--success {
    background: #e7f5ed;
    color: #286447;
    padding: 9px 11px;
}

.aeqr-dialog__footer {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 28px 24px;
}

.aeqr-button {
    border-radius: 9px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    padding: 10px 17px;
}

.aeqr-button--primary {
    background: var(--aeqr-green);
    border: 1px solid var(--aeqr-green);
    color: #fff;
}

.aeqr-button--primary:hover {
    background: var(--aeqr-green-dark);
}

.aeqr-button--secondary {
    background: #fff;
    border: 1px solid var(--aeqr-line);
    color: var(--aeqr-green);
}

.aeqr-admin {
    color: var(--aeqr-ink);
}

.aeqr-results-link{display:inline-flex;align-items:center;margin:0 0 18px;padding:11px 16px;border-radius:10px;background:#174f49;color:#fff!important;font-weight:800;text-decoration:none;box-shadow:0 8px 20px rgba(23,79,73,.16)}
.aeqr-result{max-width:1060px;margin:24px auto;padding:28px;color:#263d38}.aeqr-result__eyebrow{color:#7d692b;font-size:11px;font-weight:900;letter-spacing:.14em}.aeqr-result__title{font-size:34px;margin:8px 0 4px;color:#103d38}.aeqr-result__subtitle{color:#657873;margin:0 0 24px}.aeqr-result__grid{display:grid;grid-template-columns:1.4fr repeat(4,1fr);gap:14px}.aeqr-result__card{background:#fff;border:1px solid #d7e2de;border-radius:16px;padding:20px;box-shadow:0 8px 22px rgba(0,46,45,.06)}.aeqr-result__card h3{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#71827d;margin:0 0 14px}.aeqr-result__card strong{font-size:26px;color:#173b36}.aeqr-result__score strong{font-size:38px;display:block}.aeqr-result__pill{display:inline-flex;margin-top:12px;border-radius:99px;padding:7px 11px;font-size:12px;font-weight:800}.aeqr-result__pill.is-ok{background:#e6f6ed;color:#20754f}.aeqr-result__pill.is-low{background:#fff1ed;color:#a24e43}.aeqr-result__insight{margin:16px 0;padding:18px 20px;border-radius:14px;background:#edf6f3;border:1px solid #d7e2de}.aeqr-result__insight p{margin:6px 0 0;color:#61736e}@media(max-width:900px){.aeqr-result__grid{grid-template-columns:1fr 1fr}.aeqr-result__score{grid-column:1/-1}}

.aeqr-admin__intro {
    color: #5b6d68;
    max-width: 850px;
}

.aeqr-metrics {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    margin: 20px 0;
}

.aeqr-metric {
    background: #fff;
    border: 1px solid var(--aeqr-line);
    border-radius: 13px;
    box-shadow: 0 5px 14px rgba(0, 46, 45, .05);
    padding: 16px;
}

.aeqr-metric strong,
.aeqr-metric span {
    display: block;
}

.aeqr-metric strong {
    color: var(--aeqr-green-dark);
    font-size: 25px;
}

.aeqr-metric span {
    color: #63746f;
    font-size: 12px;
    font-weight: 800;
    margin-top: 3px;
    text-transform: uppercase;
}

.aeqr-filters {
    align-items: end;
    background: var(--aeqr-sage);
    border: 1px solid var(--aeqr-line);
    border-radius: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
    padding: 14px;
}

.aeqr-filters label {
    font-size: 12px;
    font-weight: 800;
    margin: 0 2px 0 8px;
}

.aeqr-filters select {
    background: #fff;
    border: 1px solid #cbd9d4;
    border-radius: 8px;
    padding: 8px 10px;
}

.aeqr-table {
    background: #fff;
    border: 1px solid var(--aeqr-line);
    border-radius: 13px;
    box-shadow: 0 6px 18px rgba(0, 46, 45, .05);
    overflow: hidden;
}

.aeqr-table th {
    background: var(--aeqr-sage) !important;
    color: var(--aeqr-green-dark);
    font-size: 11px;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.aeqr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.aeqr-actions .btn {
    margin: 0;
    white-space: nowrap;
}

.aeqr-delete-confirm {
    margin: 24px auto;
    max-width: 720px;
}

.aeqr-delete-warning {
    background: #fff1ed;
    border-left: 4px solid #b85a50;
    border-radius: 8px;
    color: #843d36;
    font-weight: 700;
    padding: 13px 15px;
}

.aeqr-delete-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.aeqr-chip {
    border-radius: 999px;
    display: inline-block;
    font-size: 11px;
    font-weight: 850;
    padding: 4px 9px;
}

.aeqr-status-new {
    background: #fff4d8;
    color: #745b18;
}

.aeqr-status-inreview {
    background: #e6f0f7;
    color: #315c78;
}

.aeqr-status-resolved {
    background: #e2f4e9;
    color: #286447;
}

.aeqr-status-dismissed {
    background: #eef0ef;
    color: #5b6763;
}

.aeqr-back {
    color: var(--aeqr-green);
    display: inline-block;
    font-weight: 800;
    margin-bottom: 15px;
}

.aeqr-detail-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.2fr);
}

.aeqr-detail-card {
    background: #fff;
    border: 1px solid var(--aeqr-line);
    border-radius: 14px;
    box-shadow: 0 7px 20px rgba(0, 46, 45, .06);
    padding: 22px;
}

.aeqr-detail-card h3 {
    color: var(--aeqr-green-dark);
    font-size: 17px;
    margin: 0 0 16px;
}

.aeqr-detail-row {
    border-bottom: 1px solid #e8eeeb;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.aeqr-detail-row strong {
    color: #64756f;
    display: block;
    font-size: 11px;
    letter-spacing: .05em;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.aeqr-message {
    background: #f7f9f8;
    border-left: 4px solid var(--aeqr-gold);
    border-radius: 8px;
    line-height: 1.55;
    margin-bottom: 18px;
    padding: 14px 16px;
}

.aeqr-response-form label,
.aeqr-response-form select,
.aeqr-response-form textarea {
    display: block;
    width: 100%;
}

.aeqr-response-form label {
    color: var(--aeqr-green-dark);
    font-size: 12px;
    font-weight: 800;
    margin: 12px 0 6px;
}

.aeqr-response-form select,
.aeqr-response-form textarea {
    border: 1px solid #cbd9d4;
    border-radius: 9px;
    padding: 10px;
}

.aeqr-response-form input[type="submit"] {
    margin-top: 14px;
}

.aeqr-student-reply {
    margin: 0 auto;
    max-width: 780px;
}

.aeqr-student-reply__question {
    color: var(--aeqr-green-dark);
    font-size: 18px;
    font-weight: 800;
}

.aeqr-student-reply h3 {
    margin-top: 24px;
}

.aeqr-message--reply {
    background: #eef7f2;
    border-left-color: var(--aeqr-green);
}

.aeqr-student-reply__actions {
    margin-top: 20px;
}

@media (max-width: 800px) {
    .aeqr-metrics,
    .aeqr-detail-grid {
        grid-template-columns: 1fr;
    }

    .aeqr-dialog__header,
    .aeqr-dialog__body,
    .aeqr-dialog__footer {
        padding-left: 19px;
        padding-right: 19px;
    }
}
