/*************************** FONTS ***************************/

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/Cairo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/Cairo-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/Cairo-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/Cairo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/*************************** FONTS ***************************/



/*************************** GENERAL ***************************/

html, body {
    font-family: 'Cairo', sans-serif !important;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

div.mud-input-error > .me-auto {
    margin-inline-start: 0 !important;
}


html, body, .mud-layout {
    height: 100%;
    margin: 0;
}

/*************************** GENERAL ***************************/



/*************************** MAIN LAYOUT ***************************/

.MainLayout-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.MainLayout-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.Body-container {
    flex: 1;
}

/*************************** MAIN LAYOUT ***************************/



/*************************** NAV MENU STYLING ***************************/

.nav-menu-styled .mud-nav-link {
    font-size: 1rem !important;
    font-weight: 500 !important;
    padding: 14px 16px !important;
    margin-bottom: 6px !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

    .nav-menu-styled .mud-nav-link:hover {
        background-color: #e6ecef !important;
    }

    .nav-menu-styled .mud-nav-link.active {
        background-color: rgb(13 35 148 / 12%) !important;
        color: var(--imeag-primary) !important;
    }

    .nav-menu-styled .mud-nav-link .mud-icon-root {
        font-size: 1.4rem !important;
    }

/* Dark mode nav styling */
body.mud-theme-dark .nav-menu-styled .mud-nav-link:hover {
    background-color: rgb(56 85 159) !important;
}

body.mud-theme-dark .nav-menu-styled .mud-nav-link.active {
    background-color: rgba(45, 212, 191, 0.15) !important;
    color: var(--imeag-primary) !important;
}

/*************************** NAV MENU STYLING ***************************/



/*************************** FOOTER LAYOUT ***************************/

.Footer-container {
    margin-top: auto;
    background-color: var(--imeag-bg-surface);
    border-top: 1px solid var(--imeag-border-color);
}

.Footer-paper {
    background-color: var(--imeag-bg-surface) !important;
}

/*************************** FOOTER LAYOUT ***************************/



/*************************** ERROR BAR ***************************/

#blazor-error-ui {
    background-color: red;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/*************************** ERROR BAR ***************************/



/*************************** APP PRELOADER ***************************/

.loader-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--mud-palette-background, #f8fafc) 0%, var(--mud-palette-surface, #e2e8f0) 100%);
    position: relative;
    font-family: 'Cairo', Arial, sans-serif;
}

.loader-content {
    width: 25%;
    min-width: 280px;
    background: var(--mud-palette-surface, #ffffff);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--mud-palette-divider, #e2e8f0);
}

.title-text {
    color: var(--mud-palette-text-primary, #1e293b);
    font-weight: 600;
    animation: fade-glow 2s ease-in-out infinite alternate;
}

.subtitle-text {
    color: var(--mud-palette-text-secondary, #64748b);
    font-weight: 400;
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-inline-start: 8px;
}

.loading-dot {
    width: 6px;
    height: 6px;
    background: var(--mud-palette-primary, #1C2D58);
    border-radius: 50%;
    animation: bounce-dots 1.4s ease-in-out infinite both;
}

    .loading-dot:nth-child(1) {
        animation-delay: -0.32s;
    }

    .loading-dot:nth-child(2) {
        animation-delay: -0.16s;
    }

    .loading-dot:nth-child(3) {
        animation-delay: 0s;
    }

.loading-dots-layout {
    display: inline-flex;
    gap: 4px;
    margin-inline-start: 8px;
    padding: 70px;
}

.loading-dot-layout {
    width: 20px;
    height: 20px;
    background: var(--mud-palette-primary, #1C2D58);
    border-radius: 50%;
    animation: bounce-dots 1.4s ease-in-out infinite both;
}

    .loading-dot-layout:nth-child(1) {
        animation-delay: -0.32s;
    }

    .loading-dot-layout:nth-child(2) {
        animation-delay: -0.16s;
    }

    .loading-dot-layout:nth-child(3) {
        animation-delay: 0s;
    }

.progress-bar-container {
    width: 100%;
    max-width: 250px;
    height: 8px;
    background-color: var(--mud-palette-divider, #e2e8f0);
    border-radius: 4px;
    margin: 20px auto;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--mud-palette-primary, 1C2D58);
    border-radius: 4px;
    width: var(--blazor-load-percentage, 0%);
    transition: width 0.2s ease-in-out;
}

.loading-progress-text {
    text-align: center;
    font-weight: bold;
    color: var(--mud-palette-text-primary, #1e293b);
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

.d-flex {
    display: flex;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.text-center {
    text-align: center;
}

.stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.h5 {
    font-size: 1.5rem;
    margin: 0;
}

.body1 {
    font-size: 1rem;
    margin: 0;
}

@keyframes fade-glow {
    0% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}

@keyframes bounce-dots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .loader-content {
        width: 90%;
        min-width: unset;
        padding: 2rem;
        margin: 1rem;
    }
}

/*************************** APP PRELOADER ***************************/



/*************************** Forget Password ***************************/

.auth-page-wrapper {
    min-height: 100vh;
    width: 100%;
    background-color: #f7f8fb;
}

.no-text-transform {
    text-transform: none;
}

/*************************** Reset Password ***************************/

.auth-page-wrapper {
    min-height: 100vh;
    width: 100%;
    background-color: #f7f8fb;
}
.no-text-transform {
    text-transform: none;
}

/*************************** ICON PULSE ***************************/

.pulse-icon {
    animation: pulse-scale 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes pulse-scale {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

/*************************** AUTOFILL FIX ***************************/

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: inherit !important;
    transition: background-color 5000s ease-in-out 0s;
}

/*************************** PASSWORD ICON COLOR ***************************/

.mud-input-adornment-end .mud-icon-root {
    color: #ffffff !important;
}

/*************************** Books ***************************/

.book-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

    .book-card:hover {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
    }

.book-card-media {
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #f5f5f5;
}

.book-card:hover .book-card-media {
    transform: scale(1.03);
}

.reader-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    z-index: 9999;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.loading-subtitle {
    color: #6b7280;
}

.mud-input-white .mud-input-outlined,
.mud-input-white .mud-input-slot {
    background: white;
    border-radius: 4px;
}

@media print {
    .book-reader-root {
        display: none !important;
    }
}

.book-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-primary-darken) 100%);
    overflow: hidden;
}

.book-card-placeholder-title {
    color: #ffffff !important;
    font-weight: 700;
    line-height: 1.4;
    word-break: break-word;
}

/*************************** Book Reader ***************************/

.color-picker-wrapper {
    display: flex;
    align-items: center;
    margin: 0 4px;
}

.native-color-input {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    background: none;
}

    .native-color-input::-webkit-color-swatch-wrapper {
        padding: 2px;
        border-radius: 4px;
    }

    .native-color-input::-webkit-color-swatch {
        border: none;
        border-radius: 4px;
    }

/*************************** Announcement Toast ***************************/

.announcement-toast-stack {
    position: fixed;
    bottom: 24px;
    inset-inline-end: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 360px;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}

.announcement-toast-card {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px 14px 16px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    animation: announcement-toast-in 0.28s ease-out;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .announcement-toast-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
    }

.announcement-toast-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-primary-darken) 100%);
}

.announcement-toast-body {
    flex: 1;
    min-width: 0;
}

.announcement-toast-title {
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.announcement-toast-message {
    color: var(--mud-palette-text-secondary);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.announcement-toast-meta {
    color: var(--mud-palette-primary);
    font-weight: 600;
    margin-top: 6px;
    display: block;
}

.announcement-toast-close {
    flex-shrink: 0;
    opacity: 0.6;
}

    .announcement-toast-close:hover {
        opacity: 1;
    }

@keyframes announcement-toast-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.announcement-toast-close-wrapper {
    flex-shrink: 0;
}

/*************************** Upload Tile Button ***************************/

.upload-tile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 0 16px;
    border-radius: var(--mud-default-borderradius, 6px);
    border: 1px solid var(--mud-palette-lines-inputs, #c4c4c4);
    color: var(--mud-palette-text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    gap: 8px;
}

    .upload-tile-btn:hover {
        background-color: var(--mud-palette-action-default-hover, rgba(0,0,0,0.04));
    }

.upload-tile-btn--primary {
    border-color: var(--mud-palette-error);
    color: var(--mud-palette-error);
}

.upload-tile-btn--info {
    border-color: var(--mud-palette-info);
    color: var(--mud-palette-info);
}

.upload-tile-btn--success {
    border-color: var(--mud-palette-success);
    color: var(--mud-palette-success);
    background-color: var(--mud-palette-success-hover, rgba(0,0,0,0.02));
}

.book-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px;
    overflow: hidden;
    box-sizing: border-box;
}

.book-card-placeholder-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.25rem !important; 
    line-height: 1.5 !important;
    word-break: break-word;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); 
}

/*************************** Upload Tile Button ***************************/

/* Page Jump Controls */
.page-jump-wrapper {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--reader-border);
    padding: 4px 8px;
}

.page-jump-input {
    width: 90px;
    height: 38px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.1rem;
}

.page-jump-btn {
    background: var(--reader-accent);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .page-jump-btn:hover {
        background: #1d4ed8;
        transform: scale(1.08);
    }

/* Overlays & Security */
.security-overlay, .protection-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
}

.security-overlay {
    background: rgba(11, 15, 23, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 10000;
}

.protection-overlay {
    background: rgba(11, 15, 23, 0.9);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.security-icon-wrapper {
    width: 76px;
    height: 76px;
    background: rgba(239, 68, 68, 0.1);
}

/* Buttons & Toolbar */
.reader-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

    .reader-btn-primary:hover, .exit-btn:hover {
        transform: translateY(-1px);
    }

.reader-icon-btn {
    color: var(--reader-text-muted) !important;
    padding: 6px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

    .reader-icon-btn:hover {
        color: var(--reader-text) !important;
        background: var(--reader-surface-hover) !important;
    }

.reader-tool-group {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 6px;
    border-radius: 10px;
    border: 1px solid var(--reader-border);
}

.tool-btn {
    background: transparent;
    border: none;
    color: var(--reader-text-muted);
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    transition: all 0.2s ease;
}

    .tool-btn:hover {
        color: var(--reader-text);
        background: var(--reader-surface-hover);
    }

.tool-btn-active {
    background: var(--reader-accent) !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.6) !important;
}

.eraser-step-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    padding: 0 4px;
}

/* Color Picker */
.color-picker-custom {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
}

.color-input-native {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.color-preview-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: var(--selected-color, #ff0000);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
    transition: transform 0.15s ease;
}

.color-picker-custom:hover .color-preview-ring {
    transform: scale(1.15);
    box-shadow: 0 0 10px var(--selected-color, #ff0000);
}

.text-danger-hover:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Search Bar */
.search-input-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--reader-border);
    width: 160px;
    transition: all 0.2s ease;
}

    .search-input-wrapper:focus-within {
        border-color: var(--reader-accent);
        width: 200px;
    }

.search-native-input {
    background: transparent;
    border: none;
    outline: none;
}

.search-action-btn {
    color: var(--reader-text-muted);
    cursor: pointer;
    background: none;
    border: none;
}

    .search-action-btn:hover {
        color: #fff;
    }

/* Thumbnails */
.thumb-card-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .thumb-card-wrapper:hover {
        background: var(--reader-surface-hover);
        transform: translateY(-2px);
    }

.thumb-card-active {
    border-color: var(--reader-accent) !important;
    background: rgba(37, 99, 235, 0.15) !important;
}

/* Scrollbars & Spin Button Fix */
.sidebar-scroll-container::-webkit-scrollbar, #reader-main-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.sidebar-scroll-container::-webkit-scrollbar-thumb, #reader-main-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.page-jump-input::-webkit-outer-spin-button, .page-jump-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.page-jump-input[type=number] {
    -moz-appearance: textfield;
}

/* Exit Button */
.exit-btn {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    cursor: pointer;
    height: 42px;
    min-width: 48px;
    padding: 2px 8px;
    transition: all 0.2s ease;
}

    .exit-btn:hover {
        background: #ef4444 !important;
        border-color: #ef4444 !important;
        color: #fff !important;
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
    }

.exit-btn-text {
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    margin-top: 2px;
}

/* Dashboard */
.donut-chart-svg {
    width: 160px;
    height: 160px;
}

.donut-track {
    fill: none;
    stroke: var(--mud-palette-background-grey, #f0f0f0);
    stroke-width: 18;
}

.donut-segment-master {
    fill: none;
    stroke: var(--mud-palette-primary, #2979ff);
    stroke-width: 18;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 100px 100px;
    transition: stroke-dasharray 0.6s ease-in-out;
}

.donut-segment-optional {
    fill: none;
    stroke: var(--mud-palette-success, #00e676);
    stroke-width: 18;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 100px 100px;
    transition: stroke-dasharray 0.6s ease-in-out;
}

.donut-text-count {
    fill: var(--mud-palette-text-primary, #1a2035);
    font-size: 30px;
    font-weight: bold;
    text-anchor: middle;
    font-family: inherit;
}

.donut-text-label {
    fill: var(--mud-palette-text-secondary, #7e8b9b);
    font-size: 11px;
    font-weight: bold;
    text-anchor: middle;
    letter-spacing: 1px;
    font-family: inherit;
}

/* Outer Ring */
.donut-chart-box {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient( var(--mud-palette-primary, #2979ff) 0% var(--master-pct, 0%), var(--mud-palette-success, #00e676) var(--master-pct, 0%) 100% );
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.5s ease-in-out;
}

/* Inner Center Hole */
.donut-chart-center {
    width: 124px;
    height: 124px;
    border-radius: 50%;
    background-color: var(--mud-palette-surface, #ffffff);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Outer Ring */
.donut-chart-box {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    
    background: conic-gradient(
        var(--mud-palette-primary, #2979ff) 0% var(--master-pct, 0%),
        var(--mud-palette-success, #00e676) var(--master-pct, 0%) 100%
    );
    
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.5s ease-in-out;
}

/* Inner Center Hole */
.donut-chart-center {
    width: 124px;
    height: 124px;
    border-radius: 50%;
    background-color: var(--mud-palette-surface, #ffffff);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Closed field text (selected value) */
.faculty-select-field .mud-input-slot,
.faculty-select-field .mud-select-input,
.faculty-select-field input {
    color: #ffffff !important;
}

/* Label */
.faculty-select-field .mud-input-label {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Border/outline */
.faculty-select-field .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Dropdown arrow icon */
.faculty-select-field .mud-select-icon {
    color: #ffffff !important;
}

/* Popover (open dropdown list) */
.faculty-select-popover {
    background-color: #1e2a4a !important;
}

    .faculty-select-popover .mud-list-item-text {
        color: #ffffff !important;
    }

.analytics-card {
    background: #FFFFFF;
    border: 1px solid #E7EBF1;
    border-radius: 20px;
    padding: 28px 28px 12px;
}

.analytics-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.analytics-title-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

::deep .analytics-title {
    font-weight: 700;
    color: #1E2A4A;
}

.analytics-ref {
    font-size: 0.72rem;
    color: #8A93A6;
    background: #F1F3F7;
    padding: 2px 8px;
    border-radius: 6px;
    font-variant-numeric: tabular-nums;
}

::deep .analytics-subtitle {
    color: #8A93A6;
    margin-top: 2px;
}

/* Segmented toggle */
.analytics-toggle {
    display: inline-flex;
    background: #F1F3F7;
    border-radius: 12px;
    padding: 4px;
    gap: 2px;
}

.analytics-toggle-btn {
    border: none;
    background: transparent;
    color: #64748B;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 9px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

    .analytics-toggle-btn:hover {
        color: #1E2A4A;
    }

    .analytics-toggle-btn.is-active {
        background: #1E2A4A;
        color: #FFFFFF;
    }

/* Leaderboard rows */
.analytics-list {
    display: flex;
    flex-direction: column;
}

.analytics-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 4px;
    border-bottom: 1px solid #F1F3F7;
}

    .analytics-row:last-child {
        border-bottom: none;
    }

.rank-badge {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #FFFFFF;
    background: #CBD5E1;
}

.rank-1 {
    background: #C9971E;
}

.rank-2 {
    background: #94A3B8;
}

.rank-3 {
    background: #B8763A;
}

.rank-n {
    background: #D8DEE7;
    color: #64748B;
}

.row-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

::deep .row-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1F2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-bar-track {
    width: 100%;
    height: 5px;
    background: #F1F3F7;
    border-radius: 3px;
    overflow: hidden;
}

.row-bar {
    height: 100%;
    border-radius: 3px;
    transition: width .4s ease;
}

.row-bar-teal {
    background: #0F766E;
}

.row-bar-amber {
    background: #B45309;
}

.row-value {
    font-weight: 700;
    color: #1E2A4A;
    font-variant-numeric: tabular-nums;
}

.row-value-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.row-subvalue {
    font-size: 0.72rem;
    color: #8A93A6;
    font-variant-numeric: tabular-nums;
}

/* Empty state */
.analytics-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 48px 0;
    color: #C3CAD6;
}

    .analytics-empty ::deep .mud-icon-root {
        color: #C3CAD6;
    }

/* Skeleton rows */
.analytics-row-skeleton {
    gap: 16px;
}

/* Column headers */
.analytics-list-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 4px 8px;
    border-bottom: 1px solid #F1F3F7;
}

.head-rank {
    flex: 0 0 auto;
    width: 28px;
}

.head-name {
    flex: 1 1 auto;
    font-size: 0.72rem;
    font-weight: 600;
    color: #8A93A6;
}

.head-value,
.head-value-stack {
    font-size: 0.72rem;
    font-weight: 600;
    color: #8A93A6;
    text-align: right;
    flex: 0 0 auto;
}

.head-value-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.head-value-bottom {
    font-weight: 500;
    color: #B4BBC7;
}

/* Column headers */
.analytics-list-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 4px 8px;
    border-bottom: 1px solid #F1F3F7;
}

.head-rank {
    flex: 0 0 auto;
    width: 28px;
}

.head-name {
    flex: 1 1 auto;
    font-size: 0.72rem;
    font-weight: 600;
    color: #8A93A6;
}

.head-col {
    flex: 0 0 64px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #8A93A6;
    text-align: right;
}

/* Leaderboard rows */
.row-col {
    flex: 0 0 64px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.row-value {
    font-weight: 700;
    color: #1E2A4A;
}

.row-subvalue {
    font-size: 0.8rem;
    color: #8A93A6;
}

/*************************** Student Read Books Dialog ***************************/

.stat-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-divider {
    width: 3px;
    align-self: stretch;
    border-radius: 2px;
    opacity: 0.25;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.bar-track {
    width: 100%;
    height: 10px;
    background: #EAF0FE;
    border-radius: 999px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s ease-in-out;
}

.time-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #EAF0FE;
    color: #3B4A6B;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
}

    .time-chip.small {
        background: #F1F5F9;
        font-size: 0.8rem;
    }

.count-badge {
    min-width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #DFF7EA;
    color: #2FBF71;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.donut-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-outer {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-inner {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px;
    box-sizing: border-box;
}

/*************************** Student Read Books Dialog ***************************/



/*************************** Notification ***************************/

.notification-popover {
    width: 400px !important;
    max-width: 400px !important;
}

/*************************** Notification ***************************/