﻿/* =====================================
   GLOBAL BASE
===================================== */

/* Move down content because fixed navbar */
body {
    padding-top: 50px;
    padding-bottom: 20px;
    background: #f5f7fb;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
}

.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Default form control width */
input,
select,
textarea {
    max-width: 280px;
}

@media screen and (min-width: 768px) {
    .jumbotron {
        margin-top: 20px;
    }

    .body-content {
        padding: 0;
    }
}
.ui-disabled {
    pointer-events: none;
}
/* =====================================
   NAVBAR / UNIVERSITY HEADER
===================================== */

.navbar {
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.navbar-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.university-title {
    display: block;
    width: 100%;
    font-size: 20px;
    font-weight: 600;
    color: #0d6efd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================================
   HOME PAGE HERO + ROLE CARDS
===================================== */

.hero {
    padding: 18px 15px;
}

.role-card {
    border: none;
    border-radius: 14px;
    transition: transform .3s ease, box-shadow .3s ease;
}

    .role-card:hover {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 0 12px 25px rgba(0,0,0,.12);
    }

    .role-card h5 {
        font-size: 16px;
        font-weight: 600;
    }

    .role-card p {
        font-size: 13px;
    }

/* =====================================
   LOGIN PAGE
===================================== */

/* =========================================================
   LOGIN PAGE STYLES
   ========================================================= */

body.login {
    background-color: #eef3f7;
    height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial;
}

/* Login Card */
.login-card {
    background: #fff;
    width: 320px;
    padding: 22px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.12);
}

@media (max-width:1366px) {
    .login-card {
        width: 300px;
    }
}

.login-title {
    font-weight: bold;
    font-size: 23px;
    margin-bottom: 20px;
    text-align: center;
    color: #223344;
}

/* Footer Links */
.footer-links {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
}

    .footer-links a {
        color: #007bff;
        text-decoration: none;
    }

        .footer-links a:hover {
            text-decoration: underline;
        }

/* Idle Message */
#idleInfo {
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
    color: #6c757d;
    transition: color .3s ease;
}

    #idleInfo.urgent {
        color: #dc3545 !important;
        font-weight: 600;
    }
/* =========================================================
   FORGOT PASSWORD / RESET PAGE
   ========================================================= */

body.reset-page {
    background: #eef3f7;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reset-card {
    background: #fff;
    padding: 30px;
    width: 380px;
    border-radius: 10px;
    box-shadow: 0 0 10px #aaa;
}
/* =========================================================
   VERIFY OTP PAGE
   ========================================================= */

body.otp-page {
    background: #f4f7fa;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Segoe UI", sans-serif;
}

.otp-card {
    width: 360px;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,.15);
}

.otp-title {
    font-weight: 600;
    margin-bottom: 10px;
}
/* =========================================================
   REGISTER PAGE
   ========================================================= */

body.register-page {
    background: #eef3f7;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reg-card {
    background: #ffffff;
    padding: 30px;
    width: 420px;
    border-radius: 10px;
    box-shadow: 0 0 10px #aaa;
}
/* =====================================
   TREEVIEW – SYLLABUS
===================================== */

.treeview {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
}

.tree-node {
    font-size: 14px;
    padding: 4px 2px;
    color: #212529;
}

    .tree-node img {
        margin-right: 6px;
    }

    .tree-node:hover {
        background-color: #f8f9fa;
    }

.treeview span {
    line-height: 1.5;
}

/* =====================================
   PANEL STYLING
===================================== */

.panel-title {
    font-weight: 600;
    color: #0d6efd;
}

.bg-light {
    background-color: #f8f9fa !important;
}

/* =====================================
   GRIDVIEW ENHANCEMENTS
===================================== */

.table th {
    background-color: #f1f3f5;
    font-weight: 600;
}

.table td {
    vertical-align: middle;
}

/* =====================================
   FILE VIEWER
===================================== */

iframe {
    background: #fff;
}

/* =====================================
   ERROR PAGE
===================================== */

.error-container {
    max-width: 600px;
    margin: 80px auto;
    padding: 35px;
    background: #ffffff;
    border-radius: 6px;
    text-align: center;
}

    .error-container h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .error-container p {
        color: #444;
        margin-bottom: 25px;
    }

.error-ref {
    margin-top: 20px;
    font-size: 12px;
    color: #777;
}

/* =====================================
   ACCESS DENIED PAGE
===================================== */

.access-denied-container {
    max-width: 600px;
    margin: 80px auto;
    padding: 35px;
    background: #ffffff;
    border-radius: 6px;
    text-align: center;
}

    .access-denied-container h1 {
        font-size: 24px;
        margin-bottom: 15px;
        color: #c0392b;
    }

    .access-denied-container p {
        color: #444;
        margin-bottom: 25px;
    }

/* =====================================
   BUTTON DISABLED STYLE
===================================== */

button[disabled],
input[disabled] {
    cursor: not-allowed;
    opacity: .65;
}
/* =========================================================
   MASTER LAYOUT – TOPBAR / SIDEBAR / CONTENT
   ========================================================= */

html, body {
    padding: 0;
    margin: 0;
    height: 100%;
    overflow-y: auto;
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
}

/* TOP BAR */
.topbar {
    background-color: #343a40;
    color: #fff;
    padding: 8px 16px;
    height: 60px;
    display: flex;
}

/* MAIN WRAPPER */
.main-wrapper {
    display: flex;
    height: calc(100vh - 95px);
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    background-color: #1e2a38;
    color: #fff;
    overflow-y: auto;
    padding-top: 8px;
    font-size: 13px;
}

.sidebar-header {
    text-align: center;
    padding: 18px;
    font-size: 15px;
    font-weight: bold;
    border-bottom: 1px solid #34495e;
}

.sidebar-item {
    padding: 8px 16px;
    position: relative;
    display: block;
    color: #d0d0d0;
    text-decoration: none;
    font-size: 13px;
}

    .sidebar-item:hover {
        background-color: #16a09c;
        color: #fff;
        border-radius: 8px;
    }

    .sidebar-item.active {
        background-color: #167cdd;
        color: #fff;
        font-weight: 600;
        border-radius: 8px;
    }

        .sidebar-item.active::before {
            content: "";
            width: 4px;
            height: 100%;
            background-color: #fff;
            position: absolute;
            left: 0;
            top: 0;
            border-radius: 0 4px 4px 0;
        }

    .sidebar-item i {
        margin-right: 6px;
        font-size: 0.8rem;
    }

/* SUBMENU */
.sidebar ul.collapse {
    margin-top: 4px;
    padding-left: 0;
}

    .sidebar ul.collapse .nav-link {
        display: flex;
        gap: 8px;
        padding: 8px 14px;
        margin: 4px 14px;
        border-radius: 10px;
        color: #e9f2ff;
        font-size: 0.95rem;
    }

        .sidebar ul.collapse .nav-link:hover {
            background-color: #16a09c;
            color: #fff;
        }

        .sidebar ul.collapse .nav-link.active {
            background-color: #167cdd;
            color: #fff;
            font-weight: 600;
        }

            .sidebar ul.collapse .nav-link.active::before {
                content: "";
                width: 4px;
                height: 100%;
                background-color: #fff;
                position: absolute;
                left: 0;
                top: 0;
            }

/* DROPDOWN */
.dropdown-hover > ul.collapse {
    display: none;
    max-height: 0;
    overflow: hidden;
}

.dropdown-hover:hover > ul.collapse,
.dropdown-hover.active > ul.collapse {
    display: block;
    max-height: 500px;
}

/* CONTENT */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #f4f7fa;
}

.content-box {
    background: #fff;
    padding: 18px;
    border-radius: 8px;
    box-shadow: 0 0 6px #ccc;
}

/* FOOTER */
.footer {
    height: 35px;
    background-color: #343a40;
    color: #ddd;
    text-align: center;
    padding-top: 7px;
    font-size: 12px;
}

/* TREEVIEW WRAP */
.treeview .tv-desc {
    display: inline-block;
    max-width: 75%;
    white-space: normal;
    overflow-wrap: break-word;
}

/* SELECT2 FIX */
.form-select {
    min-height: 38px;
    padding: 6px 12px;
}

.select2-container--default .select2-selection--single {
    min-height: 38px !important;
    padding: 6px 12px !important;
    display: flex !important;
    align-items: center !important;
}

/* OFFCANVAS */
.offcanvas .sidebar-item {
    padding: 10px 16px;
    display: block;
    color: #e9f2ff;
}

    .offcanvas .sidebar-item:hover {
        background-color: #16a09c;
        color: #fff;
    }
/* =========================================================
   HOME PAGE STYLES
   ========================================================= */

.home-page body {
    background: #f5f7fb;
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
    padding-top: 48px;
}

/* Navbar Logo */
.navbar-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

/* University Title */
.university-title {
    display: block;
    width: 100%;
    font-size: 20px;
    font-weight: 600;
    color: #0d6efd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* HERO */
.hero {
    padding: 18px 15px;
    animation: fadeUp .8s ease-in-out;
}

    .hero h2 {
        font-size: 26px;
    }

    .hero p {
        font-size: 15px;
    }

/* ROLE CARDS */
.role-card {
    border: none;
    border-radius: 14px;
    transition: transform .3s ease, box-shadow .3s ease;
    animation: fadeUp .9s ease forwards;
    opacity: 0;
}

    .role-card:hover {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 0 12px 25px rgba(0,0,0,.12);
    }

    .role-card h5 {
        font-size: 16px;
        font-weight: 600;
    }

    .role-card p {
        font-size: 13px;
    }

/* Button sizing override */
.btn-sm {
    font-size: 12px;
    padding: 4px 10px;
}

/* Icon animation */
.role-card i {
    transition: transform .3s ease;
}

.role-card:hover i {
    transform: scale(1.15);
}

/* Footer */
footer {
    font-size: 12px;
}

/* Modal list */
.modal-body li {
    font-size: 13px;
    margin-bottom: 6px;
}

/* Navbar subtle shadow */
.navbar {
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.navbar-brand i {
    transition: transform .2s ease;
}

.navbar-brand:hover i {
    transform: scale(1.1);
}

/* Stagger animation */
.role-card:nth-child(1) {
    animation-delay: .1s
}

.role-card:nth-child(2) {
    animation-delay: .2s
}

.role-card:nth-child(3) {
    animation-delay: .3s
}

.role-card:nth-child(4) {
    animation-delay: .4s
}

/* Animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ================= FONTS ================= */

/* Hindi Unicode */
@font-face {
    font-family: 'HindiFont';
    src: url('/fonts/NotoSansDevanagari-Regular.ttf') format('truetype');
}

/* Urdu */
@font-face {
    font-family: 'UrduFont';
    src: url('/fonts/NotoNastaliqUrdu-Regular.ttf') format('truetype');
}

/* Kruti Dev 010 */
@font-face {
    font-family: 'KrutiDev';
    src: url('/fonts/KRDV010.ttf') format('truetype');
}

/* ================= CLASSES ================= */

.hindi-font {
    font-family: 'HindiFont';
}

.urdu-font {
    font-family: 'UrduFont';
    direction: rtl;
    text-align: right;
}

.kruti-font {
    font-family: 'KrutiDev';
}

/* Optional better textbox UI */
.text-area {
    font-size: 18px;
    padding: 10px;
    width: 600px;
}
/* Responsive */
@media (max-width:768px) {
    .accordion-header {
        display: none;
    }
}
/* CONTENT EDITOR */

.content-editor {
    display: block;
    width: 100%;
    min-height: 150px;
    border: 1px solid #999 !important;
    border-radius: 5px;
    padding: 10px;
    background: #fff;
    overflow: auto;
}

    .content-editor:focus {
        outline: none;
        border-color: #0d6efd !important;
        box-shadow: 0 0 5px rgba(13,110,253,.3);
    }

    .content-editor img,
    .question-html img {
        display: inline-block !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 50px;
        border: 1px solid #ccc;
    }

    .content-editor table {
        border-collapse: collapse;
    }

        .content-editor table td,
        .content-editor table th {
            border: 1px solid #999;
            padding: 5px;
        }