:root {
    --primary: rgb(52, 152, 219);
    --bodyBG: rgb(1, 52, 102);
    --secondaryBG: rgba(255, 255, 255, 0.1);
    --textWhite: #fff;
    --secondary: #5dade2;
    --sessionnaire: #f5b041;
    --Abscent: #ec7063;
    --light: rgba(255, 255, 255, 0.15);
    --gray: rgba(255, 255, 255, 0.55);
    --shadow: rgba(30, 90, 150, 0.25);
    --line: rgba(255, 255, 255, 0.18);
    --success: #27ae60;
    --fail: #e74c3c;
    --text: rgba(255, 255, 255, 0.85);
}

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

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bodyBG);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    position: relative;
    padding-bottom: 30px;
}

html {
    scroll-behavior: smooth;
}

a {
    color: var(--secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

a:hover {
    color: #7ec8f7;
}

a:active {
    opacity: 0.85;
    transition: opacity 0.05s;
}

a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(93, 173, 226, 0.5);
    border-radius: 6px;
}

.content {
    max-width: 500px;
    width: 100%;
    overflow: hidden;
}

.browser-card {
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    padding: 20px;
    padding-top: 0;
}

.header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: var(--textWhite);
    margin: 12px 0 0;
    min-height: 40px;
}

.page-brand {
    text-align: center;
    padding: 4px 0 14px;
}

.page-brand__logo {
    width: 150px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}


.page-brand a {
    display: inline-block;
    text-decoration: none;
    border: none;
}

.page-h1 {
    color: var(--textWhite);
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 14px;
    padding: 0 4px;
}

.res-seo-section {
    margin-bottom: 4px;
}

.res-seo-section .section-heading {
    color: var(--textWhite);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    margin: 14px 0 10px;
    line-height: 1.4;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

h1 {
    font-weight: 500;
    font-size: 24px;
    margin-bottom: 5px;
}

.subtitle {
    font-weight: 300;
    opacity: 0.9;
    font-size: 16px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
    padding: 8px;
    background: var(--secondaryBG);
    border-radius: 10px;
}

.breadcrumb a {
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.breadcrumb a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.breadcrumb a:active {
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.2);
}

.breadcrumb .separator {
    color: var(--gray);
    font-size: 14px;
}

.results___notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.22), rgba(255, 255, 255, 0.12));
    border: 1px solid rgba(93, 173, 226, 0.45);
    box-shadow: 0 4px 14px var(--shadow);
}

.results___notice__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    color: #f9e79f;
    font-size: 18px;
}

.results___notice__body {
    flex: 1;
    min-width: 0;
    text-align: start;
}

.results___notice__title {
    font-weight: 700;
    font-size: 15px;
    color: var(--textWhite);
    margin-bottom: 4px;
}

.results___notice__text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
}

.results___notice__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.results___notice__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.results___notice__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    color: #fff;
}

.results___notice__btn--facebook {
    background: #1877f2;
    border-color: rgba(255, 255, 255, 0.2);
}

.results___notice__btn--facebook:hover {
    background: #166fe5;
}

.results___notice__btn--whatsapp {
    background: #25d366;
    border-color: rgba(255, 255, 255, 0.2);
}

.results___notice__btn--whatsapp:hover {
    background: #1ebe57;
}

.exams-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
    width: 100%;
}

.exam-card {
    background: var(--secondaryBG);
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    box-shadow: 0 3px 10px var(--shadow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.exam-card:hover {
    border-color: rgba(93, 173, 226, 0.3);
    box-shadow: 0 4px 12px var(--shadow);
}

.exam-card:active {
    opacity: 0.9;
    transform: none;
    transition: opacity 0.05s;
}

.exam-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 10px;
    color: var(--secondary);
    font-size: 20px;
}

.exam-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--textWhite);
    font-size: 14px;
    line-height: 1.35;
    word-break: break-word;
}

.exam-date {
    font-size: 13px;
    color: var(--gray);
}

.items-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.item {
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    flex: 1;
    min-width: calc(50% - 15px);
    background: var(--secondaryBG);
    border: 1px solid transparent;
    color: var(--textWhite);
    backdrop-filter: blur(5px);
    -webkit-tap-highlight-color: transparent;
}

.item:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(93, 173, 226, 0.3);
}

.item:active {
    opacity: 0.9;
    transform: none;
}

.item-icon {
    width: 50px;
    height: 50px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    color: var(--secondary);
    font-size: 20px;
}

.item-name {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 16px;
}

.item-meta {
    font-size: 13px;
    color: var(--gray);
}

.no-data {
    background: var(--secondaryBG);
    padding: 40px 20px;
    text-align: center;
    border-radius: 10px;
    margin: 50px 0;
}

.no-data-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.no-data h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: white;
}

.no-data p {
    color: white;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--textWhite);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--secondary);
    color: var(--secondary);
}

.btn-primary:hover {
    background-color: #6cb2eb;
}

.btn-outline:hover {
    background-color: rgba(93, 173, 226, 0.1);
}

.btn-primary:active {
    background-color: #4a9fcf;
    transform: none;
}

.btn-outline:active {
    background-color: rgba(93, 173, 226, 0.2);
    transform: none;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(93, 173, 226, 0.6);
}

.student-profile {
    text-align: center;
    margin-bottom: 20px;
}

.student-profile__head {
    margin-bottom: 4px;
}

.student-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--textWhite);
    margin: 15px 0 5px;
    padding-bottom: 10px;       
    border-bottom: 2px solid var(--secondary);  
    display: inline-block;   
}

.student-id {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 12px;
}

.student-profile__details {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: start;
}

.detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-item:first-child {
    padding-top: 0;
}

.detail-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    flex-shrink: 0;
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--textWhite);
    text-align: end;
}

.detail-value a {
    color: var(--secondary);
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
}

.detail-value a:active {
    opacity: 0.85;
}

.average {
    font-size: 1.05rem;
    font-weight: 700;
}

.decision {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 8px 0 4px;
    line-height: 1.2;
}

.success {
    color: var(--success);
}

.fail {
    color: var(--fail);
}

.sessionnaire {
    color: var(--sessionnaire);
}

.Abscent {
    color: var(--gray);
}

.no-decision {
    color: var(--gray);
}

.img-section {
    margin: 25px 0;
}

.img-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.img-large {
    flex: 1;
    min-width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.img-medium {
    flex: 1;
    min-width: 10%;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.img-small {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.img-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.img-placeholder {
    color: var(--gray);
    text-align: center;
    padding: 15px;
}

.img-placeholder i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.ads-zone {
    width: 100%;
    margin: 12px 0;
}

.ads-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.ads-zone--strip .ads-row {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
}

.ads-zone--strip .ad-item {
    flex: 1 1 0;
    min-width: 0;
}

.ads-zone--featured .ads-row {
    flex-direction: column;
}

.ads-zone--featured .ad-item {
    width: 100%;
}

.ads-zone--ribbon {
    display: flex;
    justify-content: center;
}

.ads-zone--ribbon .ads-row {
    flex-wrap: nowrap;
    justify-content: center;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 4px;
}

.ads-zone--ribbon .ad-item {
    flex: 0 0 auto;
}

.ads-zone--footer .ads-row {
    flex-wrap: wrap;
    justify-content: center;
}

.ads-zone--footer .ad-item--card {
    flex: 1 1 calc(50% - 5px);
    min-width: 120px;
    max-width: 100%;
}

.ad-item {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--line);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.ad-item:hover {
    border-color: var(--secondary);
}

.ad-item:active {
    opacity: 0.9;
    transform: none;
}

.ad-item__img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.ads-zone--strip .ad-item:only-child {
    flex: 1 1 100%;
}

.ads-zone--strip .ad-item:only-child .ad-item__img {
    max-height: 96px;
}

.search-box {
    background: var(--secondaryBG);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid transparent;
}

.search-title {
    font-size: 18px;
    color: var(--textWhite);
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
}

.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    background: var(--secondaryBG);
    min-width: 200px;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--textWhite);
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.search-button {
    background-color: var(--secondary);
    color: var(--textWhite);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.search-button:hover {
    background-color: #6cb2eb;
}

.search-button:active {
    background-color: #4a9fcf;
    transform: none;
}

.search-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(93, 173, 226, 0.6);
}

.students-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    width: 100%;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    overflow: hidden;
}

.students-list > a {
    display: block;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.students-list > a:last-child {
    border-bottom: none;
}

.students-list > a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.students-list > a:active {
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.05s;
}

.student-card-list {
    background: transparent;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: none;
}

.list-rank {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    color: var(--textWhite);
    font-size: 1.1rem;
    background: linear-gradient(135deg, rgba(93, 173, 226, 0.6), rgba(52, 152, 219, 0.3));
    border-radius: 40px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.student-details-list {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.students-list .student-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--textWhite);
    margin: 0;
    padding: 0;
    letter-spacing: -0.2px;
}

.students-list .student-id {
    font-size: 0.7rem;
    color: var(--gray);
    margin: 4px 0 0;
    font-family: monospace;
    letter-spacing: 0.5px;
}

.student-grade-list {
    background: rgba(93, 173, 226, 0.25);
    padding: 6px 14px;
    border-radius: 40px;
    font-weight: 700;
    color: var(--textWhite);
    font-size: 0.9rem;
    margin: 0;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}


.students-list > a:active .student-card-list::after {
    transform: translateX(-1px);
}

.students-list > a:hover .list-rank {
    background: linear-gradient(135deg, var(--secondary), rgba(52, 152, 219, 0.8));
    transform: scale(1.02);
}

.students-list > a:active .list-rank {
    transform: scale(0.98);
}

.footer {
    text-align: center;
    padding: 15px 0;
    color: var(--gray);
    font-size: 13px;
}

.res-page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bodyBG);
}

.res-page-loader__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.res-page-loader__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.18);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: res-page-spin 0.75s linear infinite;
}

.res-page-loader__text {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0;
}

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

html.res-ready .res-page-loader {
    display: none;
}

@media (max-width: 768px) {
    .img-small {
        width: 60px;
        height: 60px;
    }
    
    .student-name {
        font-size: 24px;
    }

    .student-card-list {
        padding: 14px 12px;
        gap: 10px;
    }

    .list-rank {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .student-grade-list {
        padding: 4px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 420px) {
    .student-name {
        font-size: 1.25rem;
    }

    .decision {
        font-size: 1.35rem;
    }

    .student-card-list {
        padding: 12px 10px;
    }

    .list-rank {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}