/* ============================================
   STUDENT PORTAL - PREMIUM RED GRADIENT THEME
   ============================================ */

/* Keyframe Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes studentNotifFade {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    10% {
        opacity: 1;
        transform: translateY(0);
    }

    70% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1200px;
    height: 1200px;
    background: url('logo.jpg') center/contain no-repeat;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

h1,
h2,
h3,
h4 {
    font-family: 'Fredoka', sans-serif;
}

/* Login */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('https://images.unsplash.com/photo-1580582932707-520aed937b7b?w=1600&h=900&fit=crop') center/cover no-repeat;
    padding: 2rem;
    position: relative;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(200, 35, 51, 0.75);
}

.login-card {
    background: #fff;
    padding: 0;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 100%;
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: left;
    animation: cardEntrance 0.4s ease forwards;
    overflow: hidden;
}

.login-split {
    display: flex;
}

.login-left {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.login-right::before {
    display: none;
}

.login-illustration {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 0 24px 24px 0;
}

.login-title {
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    font-size: 1rem;
    z-index: 1;
}

.input-icon-wrap input {
    padding-left: 2.5rem !important;
    width: 100%;
}

.login-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.login-logo {
    height: 60px;
    margin-bottom: 0.5rem;
}

.login-header h1 {
    color: #b71c1c;
    font-size: 1.6rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .login-split {
        flex-direction: column;
    }

    .login-right {
        display: none;
    }

    .login-left {
        padding: 2rem;
    }

    .login-card {
        max-width: 400px;
    }

    .login-header {
        text-align: center;
    }
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus {
    outline: none;
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.btn-login {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #b71c1c, #e53935);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.4);
    will-change: transform;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(183, 28, 28, 0.5);
}

.btn-login:active {
    transform: scale(0.97);
}

.btn-cancel-pw {
    width: 100%;
    padding: 0.9rem;
    background: transparent;
    color: #666;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0.5rem;
}

.btn-cancel-pw:hover {
    background: #f5f5f5;
    border-color: #bbb;
    color: #333;
}

.btn-cancel-pw:active {
    transform: scale(0.97);
}

.error-msg {
    color: #b71c1c;
    margin-top: 1rem;
    font-weight: 600;
    min-height: 1.5rem;
}

.back-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: #b71c1c;
}

.login-help {
    margin-top: 0.8rem;
    color: #888;
    font-size: 0.7rem;
    line-height: 1.3;
    text-align: center;
    padding: 0;
    background: none;
    border-radius: 0;
    border: none;
}

/* Dashboard Header */
.dash-header {
    background: linear-gradient(135deg, #8e0000 0%, #b71c1c 40%, #e53935 100%);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    box-shadow: 0 4px 20px rgba(183, 28, 28, 0.35);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dash-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
}

.dash-logo-img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.dash-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dash-user span {
    font-weight: 600;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.4rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-logout:active {
    transform: scale(0.97);
}

.dash-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    overflow: visible;
    animation: slideUp 0.5s ease;
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

/* Info Card */
.info-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.04);
    width: 100%;
    margin-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-left: 5px solid #e53935;
    animation: cardEntrance 0.4s ease forwards;
}

.info-avatar {
    font-size: 5rem;
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.info-details h2 {
    color: #b71c1c;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.info-details p {
    color: #555;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.info-datetime {
    margin-left: auto;
    text-align: right;
}

.info-datetime .greeting-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #b71c1c;
    margin-bottom: 0.3rem;
}

.info-datetime .datetime-text {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.2rem;
}

.info-datetime .time-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

/* Tabs */
.dash-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    background: #fff;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.04);
    width: 220px;
    min-width: 220px;
    height: fit-content;
    position: sticky;
    top: 5rem;
}

.dash-tab {
    padding: 0.8rem 1.2rem;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    text-align: left;
    white-space: nowrap;
}

.dash-tab.active,
.dash-tab:hover {
    background: linear-gradient(135deg, #b71c1c, #e53935);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.35);
}

.dash-tab:active {
    transform: scale(0.97);
}

.dash-main-content {
    flex: 1;
    min-width: 0;
    padding-left: 2rem;
}

/* Panels */
.dash-panel {
    display: none;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.04);
    animation: cardEntrance 0.4s ease forwards;
}

#announcements,
#attendance {
    background: #fff;
}

.dash-panel.active {
    display: block;
    overflow: visible;
}

.dash-panel h3 {
    color: #b71c1c;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

/* Payment Summary */
.payment-summary {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.summary-item {
    flex: 1;
    background: #fafafa;
    padding: 1.2rem;
    border-radius: 12px;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.summary-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.summary-label {
    display: block;
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.summary-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
}

.summary-value.paid {
    color: #2e7d32;
}

.summary-value.balance {
    color: #b71c1c;
}

/* Student Payment Dashboard - Redesigned */
.student-pay-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.student-pay-card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    border-left: 4px solid #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.student-pay-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.student-pay-tuition {
    border-left-color: #1565c0;
}

.student-pay-paid {
    border-left-color: #2e7d32;
}

.student-pay-balance {
    border-left-color: #b71c1c;
}

.student-pay-expense {
    border-left-color: #880e4f;
}

.student-pay-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 0.3rem;
}

.student-pay-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: #333;
}

.student-pay-tuition .student-pay-value {
    color: #1565c0;
}

.student-pay-paid .student-pay-value {
    color: #2e7d32;
}

.student-pay-balance .student-pay-value {
    color: #b71c1c;
}

.student-pay-expense .student-pay-value {
    color: #880e4f;
}

.student-pay-sub {
    display: block;
    font-size: 0.7rem;
    color: #999;
    margin-top: 0.2rem;
}

/* Student Payment Toolbar */
.student-pay-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.student-pay-filters {
    display: flex;
    gap: 0.5rem;
}

.student-pay-select {
    padding: 0.4rem 0.7rem;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 0.82rem;
    background: #fff;
    color: #333;
}

.student-pay-select:focus {
    border-color: #b71c1c;
    outline: none;
}

.student-pay-refresh {
    cursor: pointer;
    font-size: 1.2rem;
    display: inline-block;
    transition: transform 0.2s ease;
}

/* Student Payment Type Badges */
.student-type-tuition,
.student-type-expense,
.student-type-discount {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.student-type-tuition {
    background: #e3f2fd;
    color: #1565c0;
}

.student-type-expense {
    background: #fff3e0;
    color: #e65100;
}

.student-type-discount {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Data Table */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 500px;
}

.data-table th {
    background: linear-gradient(135deg, #b71c1c, #e53935);
    color: #fff;
    padding: 0.9rem 1rem;
    text-align: left;
    font-weight: 600;
}

.data-table th:first-child {
    border-radius: 12px 0 0 0;
}

.data-table th:last-child {
    border-radius: 0 12px 0 0;
}

.data-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    font-size: 0.88rem;
}

.data-table tbody tr:nth-child(even) td {
    background: #fafafa;
}

.data-table tr:hover td {
    background: #fff5f5;
}

.status-paid {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3e0;
    color: #e65100;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Activity & Project Cards */
.activity-list,
.project-list {
    display: grid;
    gap: 1rem;
}

.activity-card,
.project-card {
    background: #fafafa;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #e53935;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    will-change: transform;
}

.activity-card:hover,
.project-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 16px rgba(183, 28, 28, 0.1);
    background: #fff5f5;
}

.activity-card:active,
.project-card:active {
    transform: translateX(3px) scale(0.99);
}

.activity-card h4,
.project-card h4 {
    color: #333;
    margin-bottom: 0.3rem;
}

.activity-card .meta,
.project-card .meta {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.activity-card p,
.project-card p {
    color: #555;
}

/* Announcement preview (See More / Collapse) */
.announcement-preview {
    max-height: 80px;
    overflow: hidden;
    position: relative;
}

.announcement-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, #fafafa);
    pointer-events: none;
}

.announcement-body ul,
.announcement-body ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.announcement-body a {
    color: #b71c1c;
    text-decoration: underline;
}

.grade-badge {
    display: inline-block;
    background: linear-gradient(135deg, #b71c1c, #e53935);
    color: #fff;
    padding: 0.2rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 0.5rem;
    box-shadow: 0 2px 6px rgba(183, 28, 28, 0.3);
}


/* Responsive */
@media (max-width: 768px) {
    .info-card {
        flex-direction: column;
        text-align: center;
    }

    .dash-content {
        flex-direction: column;
        overflow-x: visible;
    }

    .dash-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        min-width: unset;
        position: static;
    }

    .dash-main-content {
        padding-left: 0;
        min-width: 0;
        overflow-x: visible;
    }

    .dash-tab {
        text-align: center;
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }

    .payment-summary {
        flex-direction: column;
    }

    .dash-header {
        flex-direction: column;
        gap: 1rem;
    }

    .dash-content {
        padding: 0 1rem;
    }

    .dash-panel {
        padding: 1.2rem;
        overflow-x: visible;
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }

    .data-table {
        font-size: 0.8rem;
        min-width: 550px;
    }

    .data-table th,
    .data-table td {
        padding: 0.6rem 0.5rem;
        white-space: nowrap;
    }

    .student-pay-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }

    .student-pay-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Activity Photos */
.activity-photo-wrapper {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.activity-photo {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.activity-photo:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.photo-hint {
    color: #888;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Filter Row */
.filter-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-row label {
    font-weight: 600;
    color: #555;
}

.filter-row select {
    padding: 0.5rem 1rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-row select:focus {
    outline: none;
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

/* Sort Row */
.sort-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.sort-row label {
    font-weight: 700;
    color: #b71c1c;
    font-size: 0.95rem;
}

.sort-row select {
    padding: 0.5rem 1.2rem;
    border: 1.5px solid #e53935;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    background: #fff;
    color: #b71c1c;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sort-row select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.12);
}

/* Student Notification */
.student-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(46, 125, 50, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 8px 32px rgba(46, 125, 50, 0.35);
    animation: studentNotifFade 8s ease forwards;
}

.student-notification button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.student-notification button:hover {
    background: rgba(255, 255, 255, 0.25);
}

.student-notification-error {
    background: rgba(183, 28, 28, 0.9) !important;
    box-shadow: 0 8px 32px rgba(183, 28, 28, 0.35) !important;
}

/* Assessment View Cards */
.assessment-view-card {
    background: #fafafa;
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    border-left: 4px solid #e53935;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    will-change: transform;
}

.assessment-view-card:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.08);
}

.assessment-view-card h4 {
    color: #b71c1c;
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}

.assessment-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.assessment-view-quarter {
    background: #fff;
    padding: 0.8rem;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s;
}

.assessment-view-quarter:hover {
    border-color: #ffcdd2;
    box-shadow: 0 2px 8px rgba(183, 28, 28, 0.06);
}

.quarter-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #b71c1c;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}

.assessment-view-quarter p {
    color: #333;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 500px) {
    .assessment-view-grid {
        grid-template-columns: 1fr;
    }
}

/* Avatar Upload Button */
.info-avatar {
    position: relative;
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: linear-gradient(135deg, #b71c1c, #e53935);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(183, 28, 28, 0.4);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar-upload-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.5);
}

/* Calendar Event Cards */
.event-type-badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Pay Now Section */
.payment-options-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.payment-options-section h4 {
    color: #b71c1c;
    margin-bottom: 0.5rem;
}

.pay-now-desc {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

.pay-now-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

.qr-code-box {
    text-align: center;
    background: #fafafa;
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s;
}

.qr-code-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.qr-code-box canvas {
    border-radius: 8px;
}

.qr-label {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
}

.bank-details-box {
    background: #fafafa;
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bank-details-box h5 {
    color: #333;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.bank-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.bank-detail-row span {
    color: #666;
}

.bank-detail-row strong {
    color: #333;
}

.bank-note {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

@media (max-width: 600px) {
    .pay-now-grid {
        grid-template-columns: 1fr;
    }

    .qr-code-box {
        max-width: 220px;
        margin: 0 auto;
    }
}


/* ============================================
   NOTIFICATION CENTER (Bell Icon)
   ============================================ */
.notif-bell {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0.3rem;
    transition: transform 0.2s;
}

.notif-bell:hover {
    transform: scale(1.1);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff1744;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-center {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 350px;
    max-height: 450px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 5000;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notif-center-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #eee;
}

.notif-center-header h4 {
    color: #333;
    margin: 0;
}

.notif-center-header button {
    background: none;
    border: none;
    color: #b71c1c;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
}

.notif-center-list {
    max-height: 380px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.notif-item {
    display: flex;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid #f5f5f5;
    align-items: flex-start;
}

.notif-item.unread {
    background: #fff8f8;
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    margin-top: 6px;
    flex-shrink: 0;
}

.notif-item.unread .notif-dot {
    background: #b71c1c;
}

.notif-item p {
    font-size: 0.85rem;
    color: #333;
    margin: 0;
}

.notif-time {
    font-size: 0.7rem;
    color: #999;
}

.notif-empty {
    text-align: center;
    color: #888;
    padding: 2rem;
    font-size: 0.9rem;
}

@media (max-width: 500px) {
    .notif-center {
        width: calc(100% - 40px);
        right: 20px;
    }
}


/* ============================================
   UI ENHANCEMENTS - ANIMATIONS & POLISH
   ============================================ */

/* Smooth tab transitions */
.dash-panel {
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card hover effects */
.activity-card,
.project-card,
.assessment-view-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-card:hover,
.project-card:hover,
.assessment-view-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(183, 28, 28, 0.12);
}

/* Button press feedback */
.btn-login,
.btn-logout,
.dash-tab {
    transition: all 0.2s ease;
}

.btn-login:active,
.dash-tab:active {
    transform: scale(0.95);
}

/* Softer page background */
.dashboard {
    background: #f0f2f5;
}

/* Tab underline animation */
.dash-tab {
    position: relative;
    overflow: hidden;
}

.dash-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #b71c1c;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 3px;
}

.dash-tab:hover::after,
.dash-tab.active::after {
    width: 70%;
}

/* Sticky table headers */
.table-wrapper {
    max-height: 60vh;
    overflow-y: auto;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Payment summary cards hover */
.summary-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Info card avatar ring */
.info-avatar img {
    border: 3px solid #b71c1c;
    box-shadow: 0 4px 15px rgba(183, 28, 28, 0.2);
}

/* Notification toast animation */
.student-notification {
    animation: toastSlideIn 0.4s ease;
}

@keyframes toastSlideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Notification badge pulse */
.notif-badge {
    animation: pulse 2s infinite;
}

/* Improved scrollbar */
.table-wrapper::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 3px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #bdbdbd;
}

/* Status badges */
.status-paid {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3e0;
    color: #e65100;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Attendance row color coding */
.data-table tr:has(.status-paid) {
    background: rgba(46, 125, 50, 0.03);
}

/* QR code section polish */
.qr-code-box {
    transition: transform 0.2s ease;
}

.qr-code-box:hover {
    transform: scale(1.02);
}

/* Login card entrance */
.login-card {
    animation: cardEntrance 0.5s ease;
}

/* Section headings gradient */
.dash-panel h3 {
    background: linear-gradient(135deg, #b71c1c, #d32f2f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Empty state */
.dash-panel p[style*="color:#888"] {
    font-size: 1rem;
    padding: 2rem;
}


/* ============================================
   CHANGE PASSWORD MODAL (First Login)
   ============================================ */
.change-pw-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.change-pw-modal {
    background: #fff;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    animation: cardEntrance 0.4s ease;
}

.change-pw-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.change-pw-header h2 {
    color: #b71c1c;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.change-pw-header p {
    color: #666;
    font-size: 0.9rem;
}


/* ============================================
   SCHOOL CALENDAR IN STUDENT PORTAL
   ============================================ */
.dash-panel .cal-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.dash-panel .cal-month-nav {
    margin-bottom: 1.5rem;
}

.dash-panel .cal-grid-wrapper {
    max-width: 100%;
}

.dash-panel .cal-month-title {
    font-size: 1.4rem;
}


/* ============================================
   DARK MODE TOGGLE SWITCH
   ============================================ */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.theme-icon {
    font-size: 1rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background: #1a237e;
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
}

/* ============================================
   DARK MODE THEME
   ============================================ */
body.dark-mode {
    background: #1a1a2e;
}

body.dark-mode::before {
    opacity: 0.02;
}

body.dark-mode .dashboard {
    background: #1a1a2e;
}

body.dark-mode .info-card {
    background: #1e1e3a;
    border-left-color: #e53935;
}

body.dark-mode .info-details h2 {
    color: #ff8a80;
}

body.dark-mode .info-details p {
    color: #b0b0c0;
}

body.dark-mode .info-datetime .greeting-text {
    color: #ff8a80;
}

body.dark-mode .info-datetime .datetime-text {
    color: #9e9eb0;
}

body.dark-mode .info-datetime .time-text {
    color: #e8e8f0;
}

body.dark-mode .dash-tabs {
    background: #1e1e3a;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .dash-tab {
    color: #b0b0c0;
}

body.dark-mode .dash-tab.active,
body.dark-mode .dash-tab:hover {
    background: linear-gradient(135deg, #b71c1c, #e53935);
    color: #fff;
}

body.dark-mode .dash-panel {
    background: #1e1e3a;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .dash-panel h3 {
    background: linear-gradient(135deg, #ff8a80, #e53935);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode .data-table td {
    color: #d0d0e0;
    border-bottom-color: #2a2a4a;
}

body.dark-mode .data-table tr:hover td {
    background: #252545;
}

body.dark-mode .summary-item {
    background: #252545;
}

body.dark-mode .summary-label {
    color: #9e9eb0;
}

body.dark-mode .summary-value {
    color: #e8e8f0;
}

body.dark-mode .activity-card,
body.dark-mode .project-card,
body.dark-mode .assessment-view-card {
    background: #252545;
    border-left-color: #e53935;
}

body.dark-mode .activity-card h4,
body.dark-mode .project-card h4 {
    color: #e8e8f0;
}

body.dark-mode .activity-card p,
body.dark-mode .project-card p {
    color: #b0b0c0;
}

body.dark-mode .activity-card .meta,
body.dark-mode .project-card .meta {
    color: #8888a0;
}

body.dark-mode .contact-card,
body.dark-mode .bank-details-box {
    background: #252545;
    border-color: #2a2a4a;
}

body.dark-mode .bank-details-box h5 {
    color: #e8e8f0;
}

body.dark-mode .bank-detail-row span {
    color: #9e9eb0;
}

body.dark-mode .bank-detail-row strong {
    color: #e8e8f0;
}

body.dark-mode .bank-detail-row {
    border-bottom-color: #2a2a4a;
}

body.dark-mode .sort-row label {
    color: #ff8a80;
}

body.dark-mode .sort-row select {
    background: #252545;
    color: #e8e8f0;
    border-color: #e53935;
}

body.dark-mode .payment-options-section {
    border-top-color: #2a2a4a;
}

body.dark-mode .payment-options-section h4 {
    color: #ff8a80;
}

body.dark-mode .pay-now-desc {
    color: #9e9eb0;
}

body.dark-mode .bank-note {
    color: #7a7a90;
}

/* Dark mode calendar overrides */
body.dark-mode .cal-grid-wrapper {
    border-color: #2a2a4a;
}

body.dark-mode .cal-day {
    background: #1e1e3a;
    border-color: #2a2a4a;
}

body.dark-mode .cal-day:hover {
    background: #252545;
}

body.dark-mode .cal-day-number {
    color: #d0d0e0;
}

body.dark-mode .cal-day.cal-other-month {
    background: #16162e;
}

body.dark-mode .cal-day.cal-other-month .cal-day-number {
    color: #4a4a60;
}

body.dark-mode .cal-day.cal-has-event {
    background: #252545;
}

body.dark-mode .cal-month-title {
    color: #e8e8f0;
}

body.dark-mode .cal-nav-btn {
    background: #252545;
    border-color: #3a3a55;
    color: #ff8a80;
}

body.dark-mode .cal-nav-btn:hover {
    background: #e53935;
    color: #fff;
}

body.dark-mode .cal-legend-item span:last-child {
    color: #9e9eb0;
}

body.dark-mode .cal-subtitle {
    color: #9e9eb0;
}

body.dark-mode .assessment-view-quarter {
    background: #1e1e3a;
    border-color: #2a2a4a;
}

body.dark-mode .quarter-label {
    color: #ff8a80;
}

body.dark-mode .assessment-view-quarter p {
    color: #d0d0e0;
}

body.dark-mode .notif-center {
    background: #1e1e3a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

body.dark-mode .notif-center-header {
    border-bottom-color: #2a2a4a;
}

body.dark-mode .notif-center-header h4 {
    color: #e8e8f0;
}

body.dark-mode .notif-item {
    border-bottom-color: #2a2a4a;
}

body.dark-mode .notif-item.unread {
    background: #252545;
}

body.dark-mode .notif-item p {
    color: #d0d0e0;
}


/* ============================================
   LOGIN BUTTON LOADING & ANIMATIONS
   ============================================ */

/* Spinner inside button */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.4rem;
}

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

/* Button disabled state */
.btn-login:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none !important;
}

/* Button success state */
.btn-login.btn-login-success {
    background: linear-gradient(135deg, #2e7d32, #43a047) !important;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.4) !important;
}

/* Shake animation on failed login */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-6px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(6px);
    }
}

.shake {
    animation: shake 0.5s ease;
}

/* Login success notification toast */
.login-success-notif {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(46, 125, 50, 0.4);
    animation: notifSlideDown 0.4s ease, notifFadeOut 0.5s ease 2.5s forwards;
}

@keyframes notifSlideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes notifFadeOut {
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}


/* ============================================
   LOGOUT CONFIRMATION MODAL
   ============================================ */
.logout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.logout-modal-overlay .confirm-modal {
    background: #fff;
    padding: 2rem 2.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 380px;
    width: 90%;
    animation: cardEntrance 0.3s ease;
}

.logout-modal-overlay .confirm-modal p {
    font-size: 1.05rem;
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 600;
    background: none;
    -webkit-text-fill-color: #333;
}

.logout-modal-overlay .confirm-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-confirm-yes {
    padding: 0.7rem 2rem;
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.3);
}

.btn-confirm-yes:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(46, 125, 50, 0.4);
}

.btn-confirm-yes:active {
    transform: scale(0.97);
}

.btn-confirm-no {
    padding: 0.7rem 2rem;
    background: linear-gradient(135deg, #b71c1c, #e53935);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(183, 28, 28, 0.3);
}

.btn-confirm-no:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(183, 28, 28, 0.4);
}

.btn-confirm-no:active {
    transform: scale(0.97);
}