/* ================================================
   PORTAL.CSS — IIMK Faculty Recruitment Portal
   Full Version
   ================================================ */

/* ------------------------------------------------
   1. CSS VARIABLES
   ------------------------------------------------ */
:root {
    --primary:       #002368;
    --blue:          #002368;
    --iimk-dark:     #001a4f;
    --iimk-light:    rgba(0, 35, 104, 0.1);
}

/* ------------------------------------------------
   2. LOGIN / REGISTER — PAGE BACKGROUND
   ------------------------------------------------ */
.bg-gradient-primary {
    background-image: url('https://iimk.ac.in/apps/facultyApplication/assets/images/background.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    background-color: #002368 !important;
}

/* Left panel — Login */
.bg-login-image {
    background-image: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
                      url('https://iimk.ac.in/apps/facultyApplication/assets/images/background.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    min-height: 450px;
    border-radius: 0.35rem 0 0 0.35rem;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Left panel — Register */
.bg-register-image {
    background-image: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
                      url('https://iimk.ac.in/apps/facultyApplication/assets/images/background.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    min-height: 450px;
    border-radius: 0.35rem 0 0 0.35rem;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* White card */
.card.o-hidden {
    background: #fff !important;
    border-radius: 0.5rem !important;
}

/* Right side white panel */
.col-lg-6:last-child,
.col-lg-7:last-child {
    background: #fff !important;
    border-radius: 0 0.35rem 0.35rem 0 !important;
}

/* ------------------------------------------------
   3. AUTH PAGE RESPONSIVE
   ------------------------------------------------ */
@media (max-width: 992px) {
    .p-5 { padding: 2rem 1.5rem !important; }
    .my-5 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
    .card.o-hidden { margin: 1rem !important; }
    .col-lg-6:last-child,
    .col-lg-7:last-child { border-radius: 0.35rem !important; }
}

@media (max-width: 576px) {
    .container { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
    .form-group .col-sm-6 { margin-bottom: 0.75rem; }
}

/* ------------------------------------------------
   4. GLOBAL BODY & WRAPPER
   ------------------------------------------------ */
body {
    background-color: #f8f9fc !important;
    background-image: none !important;
    font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

#wrapper {
    background: #f8f9fc !important;
}

#content-wrapper {
    background: #f8f9fc !important;
}

/* ------------------------------------------------
   5. SIDEBAR — FORCE IIMK DARK BLUE
   ------------------------------------------------ */
#wrapper #accordionSidebar,
ul#accordionSidebar,
.sidebar.sidebar-dark,
.navbar-nav.sidebar {
    background: linear-gradient(180deg, #002368 10%, #001a4f 100%) !important;
    background-image: none !important;
    background-color: #002368 !important;
}

/* Sidebar brand */
#accordionSidebar .sidebar-brand,
#accordionSidebar .sidebar-brand:hover {
    background: rgba(0,0,0,0.2) !important;
    color: #fff !important;
    text-decoration: none !important;
    padding: 1.5rem 1rem !important;
}

#accordionSidebar .sidebar-brand-text,
#accordionSidebar .sidebar-brand-text * {
    color: #fff !important;
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
}

/* Sidebar logo */
.sidebar-brand-icon img {
    filter: brightness(0) invert(1) !important;
    width: 122px !important;
    height: 40px !important;
    object-fit: contain !important;
}

/* Profile section inside sidebar */
#accordionSidebar .text-white {
    color: #fff !important;
}

#accordionSidebar .text-white-50 {
    color: rgba(255,255,255,0.5) !important;
}

/* Nav links */
#accordionSidebar .nav-item .nav-link,
#accordionSidebar .nav-item .nav-link span,
#accordionSidebar .nav-item .nav-link i {
    color: rgba(255,255,255,0.8) !important;
    font-size: 0.85rem !important;
}

/* Nav link hover */
#accordionSidebar .nav-item .nav-link:hover,
#accordionSidebar .nav-item .nav-link:hover span,
#accordionSidebar .nav-item .nav-link:hover i {
    color: #fff !important;
    background: rgba(255,255,255,0.1) !important;
    border-radius: 0.35rem !important;
}

/* Active nav item */
#accordionSidebar .nav-item.active .nav-link,
#accordionSidebar .nav-item.active .nav-link span,
#accordionSidebar .nav-item.active .nav-link i {
    color: #fff !important;
    font-weight: 700 !important;
}

/* Sidebar section headings */
#accordionSidebar .sidebar-heading {
    color: rgba(255,255,255,0.4) !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.1rem !important;
    padding: 0.5rem 1rem !important;
}

/* Sidebar divider */
#accordionSidebar hr.sidebar-divider {
    border-top: 1px solid rgba(255,255,255,0.15) !important;
    margin: 0.5rem 1rem !important;
}

/* Sidebar toggle button */
#sidebarToggle {
    background-color: rgba(255,255,255,0.2) !important;
    width: 2rem !important;
    height: 2rem !important;
}

#sidebarToggle::after {
    color: rgba(255,255,255,0.5) !important;
}

/* Experience collapse submenu */
#accordionSidebar .collapse-inner {
    background: #fff !important;
    border-radius: 0.35rem !important;
    box-shadow: 0 0.15rem 1rem rgba(0,0,0,0.15) !important;
    padding: 0.5rem 0 !important;
}

#accordionSidebar .collapse-header {
    color: #b7b9cc !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1rem !important;
    padding: 0.5rem 1rem !important;
}

#accordionSidebar .collapse-item {
    color: #002368 !important;
    font-size: 0.85rem !important;
    padding: 0.5rem 1rem !important;
    display: block !important;
    border-radius: 0.35rem !important;
}

#accordionSidebar .collapse-item:hover,
#accordionSidebar .collapse-item.active {
    background: #eaecf4 !important;
    color: #002368 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* ------------------------------------------------
   6. TOPBAR
   ------------------------------------------------ */
.topbar.navbar,
nav.navbar.topbar {
    background: #fff !important;
    box-shadow: 0 0.15rem 1.75rem rgba(58,59,69,0.15) !important;
}

.topbar .nav-item .nav-link {
    color: #5a5c69 !important;
}

.topbar .nav-item .nav-link:hover {
    color: #002368 !important;
}

.topbar-divider {
    border-right: 1px solid #e3e6f0 !important;
    margin: 0 1rem !important;
    height: 2rem !important;
    align-self: center !important;
}

/* ------------------------------------------------
   7. CARDS
   ------------------------------------------------ */
.card {
    border: none !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 0.1rem 0.5rem rgba(0,0,0,0.08) !important;
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.12) !important;
}

/* Stop login and registration cards from shaking */
.card.o-hidden,
.card.o-hidden:hover {
    transform: none !important;
    transition: box-shadow 0.15s ease-in-out !important;
}

/* Border-left stat cards */
.border-left-primary  { border-left: 4px solid #002368 !important; }
.border-left-success  { border-left: 4px solid #1cc88a !important; }
.border-left-info     { border-left: 4px solid #36b9cc !important; }
.border-left-warning  { border-left: 4px solid #f6c23e !important; }
.border-left-danger   { border-left: 4px solid #e74a3b !important; }

/* Locked card (dimmed) */
.opacity-50 {
    opacity: 0.55 !important;
    pointer-events: none !important;
}

/* ------------------------------------------------
   8. BUTTONS
   ------------------------------------------------ */
.btn-primary {
    background-color: #002368 !important;
    border-color: #002368 !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #001a4f !important;
    border-color: #001a4f !important;
    color: #fff !important;
}

.btn-user {
    font-size: 0.85rem !important;
    border-radius: 2rem !important;
    padding: 0.75rem 1rem !important;
}

/* ------------------------------------------------
   9. FORM CONTROLS
   ------------------------------------------------ */
.form-control:focus {
    border-color: #002368 !important;
    box-shadow: 0 0 0 0.2rem rgba(0,35,104,0.2) !important;
}

.form-control-user {
    font-size: 0.85rem !important;
    border-radius: 2rem !important;
    padding: 0.75rem 1rem !important;
}

.is-invalid {
    border-color: #e74a3b !important;
}

.invalid-feedback {
    font-size: 0.8rem !important;
    color: #e74a3b !important;
}

/* ------------------------------------------------
   10. ALERTS
   ------------------------------------------------ */
.alert {
    border-radius: 0.5rem !important;
    font-size: 0.875rem !important;
}

.alert-dismissible .close {
    padding: 0.6rem 1rem !important;
}

/* ------------------------------------------------
   11. BADGES
   ------------------------------------------------ */
.badge {
    font-size: 0.75rem !important;
    padding: 0.35em 0.65em !important;
    border-radius: 0.35rem !important;
}

/* ------------------------------------------------
   12. TABLES
   ------------------------------------------------ */
.table thead th {
    background-color: #f8f9fc !important;
    border-bottom: 2px solid #e3e6f0 !important;
    color: #002368 !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05rem !important;
}

.table td {
    vertical-align: middle !important;
    font-size: 0.875rem !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(0,35,104,0.04) !important;
}

/* ------------------------------------------------
   13. NOTICE BOARD / LIST GROUP
   ------------------------------------------------ */
.list-group-item {
    border: none !important;
    border-bottom: 1px solid #e3e6f0 !important;
    transition: background 0.15s !important;
    font-size: 0.875rem !important;
}

.list-group-item:hover {
    background: #f8f9fc !important;
}

.icon-circle {
    width: 2.5rem !important;
    height: 2.5rem !important;
    border-radius: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

/* ------------------------------------------------
   14. FOOTER
   ------------------------------------------------ */
.sticky-footer {
    padding: 1rem 0 !important;
    border-top: 1px solid #e3e6f0 !important;
}

.sticky-footer .copyright {
    font-size: 0.8rem !important;
    color: #858796 !important;
}

/* ------------------------------------------------
   15. SCROLL TO TOP BUTTON
   ------------------------------------------------ */
.scroll-to-top {
    background: #002368 !important;
    color: #fff !important;
}

.scroll-to-top:hover {
    background: #001a4f !important;
    color: #fff !important;
}

/* ------------------------------------------------
   16. PROGRESS BAR
   ------------------------------------------------ */
.progress {
    border-radius: 2rem !important;
    height: 8px !important;
    background-color: #eaecf4 !important;
}

.progress-bar {
    border-radius: 2rem !important;
}

/* ------------------------------------------------
   17. MODAL
   ------------------------------------------------ */
.modal-header {
    background: #002368 !important;
    color: #fff !important;
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

.modal-header .modal-title {
    color: #fff !important;
}

.modal-header .close {
    color: #fff !important;
    opacity: 0.8 !important;
}

.modal-header .close:hover {
    opacity: 1 !important;
}

/* ------------------------------------------------
   18. BLINK ANIMATION (for NEW badges)
   ------------------------------------------------ */
.blink-new {
    color: #e74a3b !important;
    font-weight: bold !important;
    margin-left: 6px !important;
    animation: blink 1s infinite !important;
}

@keyframes blink {
    0%   { opacity: 1; }
    50%  { opacity: 0; }
    100% { opacity: 1; }
}

/* ------------------------------------------------
   19. PROFILE IMAGE
   ------------------------------------------------ */
.img-profile {
    width: 2rem !important;
    height: 2rem !important;
    object-fit: cover !important;
}

.profile-img-sidebar {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
}

.login-logo-right{
    width:360px;
    height:auto;
    margin:auto;
    display:block;
    margin-bottom:20px;
}


/* ------------------------------------------------
   20. RESPONSIVE — DASHBOARD CARDS
   ------------------------------------------------ */
@media (max-width: 768px) {
    .card { margin-bottom: 1rem !important; }
    .h3   { font-size: 1.2rem !important; }

    #accordionSidebar .sidebar-brand-text {
        font-size: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .d-sm-flex { display: block !important; }

    .btn-sm { font-size: 0.75rem !important; }
}