* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    font-family: 'Segoe UI', Tahoma, system-ui, sans-serif !important;
    color: #eef5ff;
    min-height: 100vh;
    background-color: #040918 !important;
    background-image: url("images/backGround_Login.jpg") !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}
@supports (background: image-set(url("images/backGround_Login.webp") type("image/webp"))) {
    body {
        background-image: image-set(
            url("images/backGround_Login.webp") type("image/webp"),
            url("images/backGround_Login.jpg") type("image/jpeg")
            ) !important;
    }
}

.topbar {
    display: flex;
    align-items: center;
    gap: .45rem;
    width: min(1100px, calc(100% - 1.4rem));
    margin: 1rem auto 0;
    padding: .4rem;
    border-radius: 999px;
    background: rgba(8, 26, 72, .62);
    border: 1px solid rgba(110, 180, 255, .4);
    box-shadow: 0 0 18px rgba(40, 120, 255, .28);
}
.brand, .who, .back, .logout {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid rgba(120, 180, 255, .4);
    background: rgba(8, 28, 80, .45);
    padding: .38rem .75rem;
    font-size: .92rem;
    white-space: nowrap;
}
.brand { font-weight: 700; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.brand i { color: #7ec8ff; }
.back, .logout { margin-inline-start: auto; }
.back:hover, .brand:hover, .logout:hover { color: #fff; filter: brightness(1.12); }

.page-title {
    color: #fff !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 1.25rem 0 1.1rem !important;
    text-align: center;
    font-weight: 800;
    text-shadow: 0 0 18px rgba(120, 180, 255, .35);
}
.container { color: #eef5ff; }

.class-card,
.report-card,
.week-card,
.activity-card,
.profile-card,
.id-card,
.empty-state,
.total-debt,
.logout-card {
    background: linear-gradient(180deg, rgba(18, 52, 130, .66), rgba(8, 24, 72, .84)) !important;
    border: 1px solid rgba(100, 170, 255, .42) !important;
    color: #eef5ff !important;
    box-shadow: 0 0 22px rgba(30, 110, 255, .22), inset 0 0 24px rgba(40, 120, 255, .08) !important;
}
.class-card .card-header,
.report-card .card-header,
.week-card .card-header,
.activity-card .card-header,
.id-head {
    background: rgba(8, 28, 84, .55) !important;
    color: #fff !important;
    border-bottom: 1px solid rgba(120, 180, 255, .22);
}
.class-card .card-header.success,
.report-card .card-header.success { box-shadow: inset -4px 0 0 #3ee0c7; }
.class-card .card-header.warning,
.report-card .card-header.warning { box-shadow: inset -4px 0 0 #ffc14d; }
.class-card .card-header.danger,
.report-card .card-header.danger { box-shadow: inset -4px 0 0 #ff6d86; }
.class-card .card-header.info,
.report-card .card-header.info { box-shadow: inset -4px 0 0 #7ad4ff; }
.class-card .card-header.primary,
.report-card .card-header.primary { box-shadow: inset -4px 0 0 #4eb4ff; }

.class-card .room-name {
    background: rgba(255, 255, 255, .12) !important;
    color: #fff;
}
.exam-dates,
.meta-line,
.student-box,
.money-item {
    background: rgba(5, 18, 52, .45) !important;
    border: 1px solid rgba(120, 170, 255, .22);
    color: #d7e7ff !important;
}
.info-label,
.debt-label,
.money-item .label,
.hint,
.extra-note,
.class-comment,
.text-muted,
.text-secondary {
    color: #c5d6f2 !important;
}
.info-value,
.money-item .value,
.text-primary,
h4, h5 {
    color: #d7eaff;
}
.info-value.positive,
.money-item.paid .value,
.status-ok,
.text-success { color: #3ee0c7 !important; }
.info-value.negative,
.status-debt,
.text-danger { color: #ff8fa3 !important; }
.money-item.extra .value { color: #ffc14d !important; }
.class-card .card-footer {
    background: transparent !important;
    border-top: 1px solid rgba(120, 180, 255, .2) !important;
}
.class-card .info-grid .info-item,
.profile-card .info-item {
    border-bottom-color: rgba(120, 180, 255, .2);
}

.score-table th,
.info-table th,
.week-table th {
    background: rgba(6, 24, 68, .72) !important;
    color: #d7eaff !important;
    border-color: rgba(120, 170, 255, .28) !important;
}
.score-table td,
.info-table td,
.week-table td {
    color: #eef5ff !important;
    border-color: rgba(120, 170, 255, .22) !important;
    background: transparent;
}
.score-table td.exam-name,
.score-table tr.sum-row td {
    color: #fff !important;
    background: rgba(8, 28, 80, .35) !important;
}
.week-table th.has-class,
.week-table td.has-class {
    background: #95aefa !important;
    color: #fff !important;
    border-color: #0f5c38 !important;
}

.day-row { color: #eef5ff; }
.day-name { color: #fff !important; }
.day-time {
    color: #d7eaff !important;
    background: rgba(5, 18, 52, .45) !important;
}
.day-row.off .day-name,
.day-row.off .day-time {
    color: #9aafcc !important;
    background: transparent !important;
}
.day-row:nth-child(odd) { background: rgba(12, 40, 100, .28) !important; }
.day-row:nth-child(even) { background: rgba(8, 24, 70, .18) !important; }
.day-row:last-child { background: rgba(255, 120, 90, .22) !important; }
.activity-date { color: #9fd4ff !important; }
.activity-tag {
    background: rgba(5, 18, 52, .55) !important;
    color: #e7f2ff !important;
}
.activity-tag.absent {
    background: #dc3545 !important;
    color: #fff !important;
}
.paid-note {
    color: #b6f3d4 !important;
    background: rgba(25, 135, 84, .28) !important;
    border: 1px solid rgba(80, 200, 140, .4);
}
.empty-state i,
.status-box,
.status-box i { color: #9ec4ff !important; }
.empty-state h5,
.status-box h5 { color: #fff !important; }

.form-label { color: #d7e6ff; }
.form-control {
    background: rgba(5, 18, 52, .72) !important;
    border: 1px solid rgba(80, 160, 255, .55) !important;
    color: #fff !important;
    border-radius: 14px !important;
    box-shadow: inset 0 0 16px rgba(30, 100, 220, .2);
}
.form-control:focus {
    border-color: #7ec8ff !important;
    box-shadow: 0 0 0 3px rgba(60, 150, 255, .25) !important;
}
.alert-success {
    background: rgba(25, 135, 84, .28);
    color: #d8ffe9;
    border-color: rgba(80, 200, 140, .45);
}
.alert-danger {
    background: rgba(220, 53, 69, .22);
    color: #ffd5db;
    border-color: rgba(255, 120, 130, .45);
}
.btn-primary,
.btn-outline-primary,
.btn-outline-secondary,
.btn-login {
    display: inline-block;
    border: 0 !important;
    border-radius: 999px !important;
    color: #fff !important;
    background: linear-gradient(180deg, #4eb4ff, #1568ee) !important;
    box-shadow: 0 0 14px rgba(40, 130, 255, .65);
    padding: .45rem 1.15rem;
    text-decoration: none;
    font-weight: 700;
}
.btn-primary:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-login:hover {
    color: #fff !important;
    filter: brightness(1.08);
}
.student-name { color: #fff !important; }
.student-photo {
    border: 1px solid rgba(140, 190, 255, .55) !important;
    box-shadow: 0 0 16px rgba(40, 120, 255, .35);
}
.footer-custom {
    background: #0000008c !important;
    border: 0 !important;
    color: #d5e2f8 !important;
    text-align: center;
    margin-top: 100%;
    padding-bottom: 1.4rem;
    position: relative;
    top: 100%;
    display: block;
}
.footer-custom a { color: #7ecbff !important; text-decoration: none; }
.footer-custom p { color: #b7c9e6 !important; }

.logout-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}
.logout-card {
    max-width: 440px;
    width: 100%;
    border-radius: 28px;
    text-align: center;
    padding: 2.2rem 1.4rem;
}
.logout-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto .8rem;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #8ecbff;
    background: rgba(6, 18, 48, .45);
}
.logout-card h2 { color: #fff; font-weight: 800; }
.logout-card p { color: #d5e4ff; }

.page .topbar { width: 100%; margin: 0; }
.wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem 2rem;
}
.panel { width: min(420px, 100%); text-align: center; }
.panel h1 {
    margin: 0 0 .35rem;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -.02em;
    text-shadow: 0 0 24px rgba(120, 180, 255, .45);
}
.subtitle { margin: 0 0 1.2rem; color: #d5e6ff; font-size: 1.15rem; }
.glass {
    position: relative;
    text-align: right;
    padding: 1.15rem 1.1rem 1rem;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(14, 42, 110, .78), rgba(7, 22, 68, .86));
    border: 1px solid rgba(110, 180, 255, .45);
    box-shadow: 0 0 0 1px rgba(255, 160, 70, .18), 0 0 36px rgba(40, 130, 255, .38), 0 24px 50px rgba(0, 0, 0, .4), inset 0 0 30px rgba(40, 120, 255, .12);
}
.glass::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(90, 210, 255, .95), transparent 38%, transparent 62%, rgba(255, 150, 50, .9));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.roles {
    display: flex;
    gap: .55rem;
    padding: .35rem;
    margin-bottom: 1.15rem;
    border-radius: 18px;
    background: rgba(4, 14, 42, .55);
    border: 1px solid rgba(90, 150, 255, .28);
}
.role {
    flex: 1;
    border: 0;
    cursor: pointer;
    border-radius: 14px;
    padding: .72rem .4rem;
    color: #d7e6ff;
    background: transparent;
    font: inherit;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}
.role i { font-size: 1.15rem; }
.role.active {
    color: #fff;
    background: linear-gradient(180deg, #49b0ff 0%, #1566ee 100%);
    box-shadow: 0 0 18px rgba(40, 140, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.field { margin-bottom: .85rem; }
.field label { display: block; margin-bottom: .35rem; color: #d7e6ff; font-size: .95rem; }
.input-wrap { position: relative; }
.input-wrap input {
    width: 100%;
    border: 1px solid rgba(80, 160, 255, .55);
    background: rgba(5, 18, 52, .72);
    color: #fff;
    border-radius: 14px;
    padding: .9rem 2.7rem;
    font: inherit;
    font-size: 1rem;
    outline: none;
    box-shadow: inset 0 0 16px rgba(30, 100, 220, .25), 0 0 12px rgba(40, 120, 255, .15);
}
.input-wrap input:focus {
    border-color: #7ec8ff;
    box-shadow: 0 0 0 3px rgba(60, 150, 255, .25), inset 0 0 16px rgba(30, 100, 220, .25);
}
.input-wrap .side-icon, .eye {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #9ec4ff;
}
.input-wrap .side-icon.left { left: .85rem; }
.eye {
    left: auto;
    right: .35rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 1.05rem;
    padding: .35rem .5rem;
}
.alert-message {
    background: rgba(255, 80, 90, .16);
    color: #ffd0d4;
    border: 1px solid rgba(255, 120, 130, .45);
    border-radius: 12px;
    padding: .55rem .7rem;
    margin-bottom: .8rem;
    text-align: center;
    font-size: .9rem;
}
.btn-enter {
    width: 100%;
    margin-top: .35rem;
    border: 0;
    cursor: pointer;
    color: #fff;
    border-radius: 18px;
    padding: .95rem 1rem;
    font: inherit;
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    background: linear-gradient(180deg, #5ec0ff 0%, #1d74ff 58%, #0d4fe0 100%);
    box-shadow: 0 0 22px rgba(40, 140, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn-enter:hover { filter: brightness(1.08); }
.secure { margin-top: 1rem; text-align: center; color: #d5e4ff; font-size: .95rem; }
.secure i { display: block; font-size: 1.35rem; color: #7eb6ff; text-shadow: 0 0 12px rgba(80, 160, 255, .8); margin-bottom: .15rem; }
.forget { margin: .85rem 0 .15rem; text-align: center; color: #c5d7f5; font-size: .92rem; }

.page {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 1rem .9rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.head { text-align: center; margin: 1.35rem 0 1rem; }
.head h1 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    text-shadow: 0 0 18px rgba(120, 180, 255, .35);
}
.head h1 i { color: #4db2ff; font-size: 1.45rem; }
.head p { margin: .45rem 0 0; color: #c9daf8; font-size: .95rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.page .card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    min-height: 210px;
    padding: 1.15rem .8rem 1rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(18, 52, 130, .62), rgba(8, 24, 72, .78));
    border: 1px solid rgba(100, 170, 255, .42);
    box-shadow: 0 0 22px rgba(30, 110, 255, .22), inset 0 0 24px rgba(40, 120, 255, .08);
}
.page .card.wide { grid-column: 1 / -1; min-height: 0; }
.page .card:hover { border-color: rgba(140, 200, 255, .8); box-shadow: 0 0 28px rgba(50, 140, 255, .4); }
.icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: .7rem;
    background: rgba(6, 18, 48, .45);
}
.page .card h2 { margin: 0 0 .3rem; font-size: 1.15rem; }
.page .card p { margin: 0 0 .85rem; color: #c5d6f2; font-size: .86rem; line-height: 1.6; }
.go {
    margin-top: auto;
    border-radius: 999px;
    padding: .4rem 1.35rem;
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
    background: linear-gradient(180deg, #4eb4ff, #1568ee);
    box-shadow: 0 0 14px rgba(40, 130, 255, .65);
}
.tone-report h2, .tone-report .icon { color: #3ee0c7; }
.tone-class h2, .tone-class .icon { color: #8ecbff; }
.tone-feedback h2, .tone-feedback .icon { color: #ff6d86; }
.tone-week h2, .tone-week .icon { color: #ffc14d; }
.tone-profile h2, .tone-profile .icon { color: #7ad4ff; }
.footer { margin-top: auto; padding-top: 1.6rem; text-align: center; color: #d5e2f8; font-size: .92rem; }
.footer a { color: #7ecbff; text-decoration: none; }
.footer .small { margin: .2rem 0 0; color: #b7c9e6; font-size: .82rem; }

.class-card, .report-card, .week-card, .activity-card, .profile-card, .id-card, .empty-state, .total-debt {
    border-radius: 1.5rem;
    overflow: hidden;
}
.class-card, .report-card { height: 100%; }
.class-card .card-header, .report-card .card-header, .week-card .card-header {
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
}
.activity-card { margin-top: 1.5rem; }
.activity-card .card-header, .week-card .card-header { padding: 1rem 1.5rem; }
.term-name { font-size: 1.1rem; font-weight: 700; }
.teacher-name { font-size: 0.9rem; }
.room-name { font-size: 0.8rem; padding: 0.2rem 0.7rem; border-radius: 2rem; }
.class-card .card-body, .report-card .card-body { padding: 1.2rem 1.5rem; }
.exam-dates, .meta-line { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; padding: 0.6rem 1rem; border-radius: 0.75rem; margin-bottom: 1rem; }
.date-item { display: flex; align-items: center; gap: 0.3rem; }
.class-card .info-grid, .info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem 1.2rem; }
.info-item, .class-card .info-grid .info-item { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.1rem 1rem;    border: 1px solid rgb(120 180 255 / 75%);
                                                border-radius: 1rem;
                                                padding: 0.2rem 1rem; }
.span-all { grid-column: 1 / -1; }
.class-card .card-footer { padding: 0.8rem 1.5rem; display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.total-debt { padding: 1rem 2rem; margin-top: 2rem; text-align: center; }
.debt-amount { font-size: 1.8rem; font-weight: 700; color: #ff8fa3; }
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state i { font-size: 4rem; }
.score-table, .info-table, .week-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.9rem; }
.score-table th, .info-table th, .week-table th, .score-table td, .info-table td, .week-table td { padding: 0.45rem 0.6rem; text-align: center; }
.score-table td.exam-name { text-align: right; }
.extra-note { margin-top: 0.8rem; font-size: 0.9rem; }
.paid-note { display: flex; align-items: center; gap: 0.45rem; border-radius: 0.75rem; padding: 0.7rem 1rem; margin-bottom: 1rem; font-weight: 700; }
.day-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.75rem 0.2rem; border-bottom: 1px solid rgba(120, 180, 255, .15); }
.day-name { min-width: 5.5rem; font-weight: 600; }
.day-time { direction: ltr; font-weight: 600; border-radius: 2rem; padding: 0.25rem 0.9rem; }
.activity-row { display: flex; flex-wrap: wrap; gap: 0.45rem 0.6rem; align-items: center; padding: 0.75rem 0.2rem; border-bottom: 1px solid rgba(120, 180, 255, .15); }
.activity-date { min-width: 7rem; font-weight: 700; }
.activity-tag { border-radius: 2rem; padding: 0.2rem 0.75rem; font-size: 0.9rem; }
.status-box { text-align: center; padding: 1.5rem 1rem; }
.status-box i { font-size: 2.5rem; }
.id-card { max-width: 760px; margin: 0 auto; }
.id-head { text-align: center; padding: 1.2rem 1rem 1rem; }
.id-head h1 { font-size: 1.35rem; font-weight: 800; margin: 0; color: #fff; }
.student-box { display: flex; gap: 1.2rem; align-items: center; border-radius: 1rem; padding: 1rem; margin-bottom: 1rem; }
.student-photo { width: 110px; height: 130px; object-fit: cover; border-radius: 1rem; }
.student-name { font-size: 1.25rem; font-weight: 800; direction: ltr; }
.money-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; margin-bottom: 1rem; }
.money-item { border-radius: 0.9rem; padding: 0.75rem 0.9rem; }
.hint { font-size: 0.82rem; }

@media (max-width: 560px) {
    .brand { max-width: 70%; font-size: .8rem; }
    .who, .back, .logout { font-size: .8rem; padding: .32rem .55rem; }
    .grid { grid-template-columns: 1fr 1fr; }
    .page .card { min-height: 196px; padding: .9rem .55rem .85rem; }
    .page .card h2, .head h1 { font-size: 1.35rem; }
}
@media (max-width: 576px) {
    .class-card .card-header, .report-card .card-header { flex-direction: column; align-items: flex-start; }
    .class-card .card-footer { flex-direction: column; align-items: stretch; }
    .class-card .card-footer .btn { width: 100%; }
    .class-card .info-grid, .info-grid, .money-grid { grid-template-columns: 1fr; }
    .exam-dates { flex-direction: column; }
    .student-box { flex-direction: column; text-align: center; }
    .student-name { text-align: center; }
}

@media print {
    body {
        background: #fff !important;
        background-image: none !important;
        color: #111 !important;
    }
    .topbar, .footer-custom, .no-print { display: none !important; }
    .id-card, .class-card, .report-card, .profile-card {
        background: #fff !important;
        color: #111 !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    .id-head, .class-card .card-header, .report-card .card-header {
        background: #1e3c72 !important;
        color: #fff !important;
    }
    .info-table th, .week-table th, .score-table th {
        background: #eef3f9 !important;
        color: #1e3c72 !important;
    }
    .info-table td, .week-table td, .score-table td,
    .info-value, .student-name, h1, h2, h4, h5 {
        color: #111 !important;
    }
    .week-table th.has-class,
    .week-table td.has-class {
        background: #157347 !important;
        color: #fff !important;
    }
}
