/* Root Theme Variables - Matches Visual Institution Brand */
:root {
    --bs-primary: #f16334;
    /* Main Orange */
    --bs-secondary: #1f7b8c;
    /* Dark Teal */
    --bs-light: #f4f7fc;
    --bs-dark: #0b2b3b;
    --bs-white: #ffffff;
}

.text-primary {
    color: #f6466c !important;
}

/*** Spinner Start ***/
/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/*** Spinner End ***/

.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    transition: 0.5s;
    z-index: 99;
}

/*** Button Start ***/
.btn {
    font-weight: 600;
    transition: .5s;
}

.btn-square {
    width: 32px;
    height: 32px;
}

.btn-sm-square {
    width: 34px;
    height: 34px;
}

.btn-md-square {
    width: 44px;
    height: 44px;
}

.btn-lg-square {
    width: 56px;
    height: 56px;
}

.btn-square,
.btn-sm-square,
.btn-md-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 50%;
}



.btn.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    box-shadow: inset 0 0 0 0 var(--bs-primary);
}

.btn.btn-primary:hover {
    box-shadow: inset 300px 0 0 0 var(--bs-light) !important;
    color: var(--bs-primary) !important;
}

.btn.btn-secondary {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
    box-shadow: inset 0 0 0 0 var(--bs-primary);
}

.btn.btn-secondary:hover {
    box-shadow: inset 300px 0 0 0 var(--bs-primary);
    color: var(--bs-light) !important;
}

.btn-hover {
    transition: 0.5s;
}

.btn-hover:hover {
    color: var(--bs-secondary) !important;
}

/*** Sub Title Start ***/
.sub-title {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    color: var(--bs-primary);
}

.sub-title::before {
    content: "";
    width: 100px;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    margin-right: -110px;
    border: 1px solid var(--bs-secondary) !important;
}

/*** Topbar Start ***/
.fixed-top .container {
    transition: 0.5s;
}

.topbar {
    padding: 2px 10px 2px 20px;
    background: var(--bs-primary) !important;
}

.topbar a,
.topbar a i {
    transition: 0.5s;
    color: white;
    text-decoration: none;
}

.topbar a:hover,
.topbar a i:hover {
    color: var(--bs-secondary) !important;
}


@media (max-width: 576px) {
    .topbar {
        display: none;
    }
}

/*** Topbar End ***/


/*** Navbar ***/
.navbar-light .navbar-nav .nav-link {
    font-family: 'Inter', sans-serif;
    position: relative;
    margin-right: 25px;
    padding: 20px 0;
    /* Reduced from 35px to fix overlap */
    color: var(--bs-dark) !important;
    font-size: 18px;
    font-weight: 500;
    outline: none;
    transition: .5s;
}

.sticky-top.navbar-light .navbar-nav .nav-link {
    padding: 15px 0;
    color: var(--bs-dark) !important;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--bs-primary) !important;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    vertical-align: middle;
    margin-left: 8px;
}

@media (min-width: 1200px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        border: 0;
        border-radius: 10px;
        transition: .5s;
        opacity: 0;
    }
}

.dropdown .dropdown-menu a:hover {
    background: var(--bs-primary);
    color: var(--bs-white);
}

.navbar .nav-item:hover .dropdown-menu {
    transform: rotateX(0deg);
    visibility: visible;
    background: var(--bs-light) !important;
    transition: .5s;
    opacity: 1;
}

@media (max-width: 991.98px) {
    .navbar.navbar-expand-lg .navbar-toggler {
        padding: 10px 20px;
        border: 1px solid var(--bs-primary);
        color: var(--bs-primary);
    }

    .navbar-light .navbar-collapse {
        margin-top: 15px;
        border-top: 1px solid #DDDDDD;
        background: white;
        padding: 10px;
    }

    .navbar-light .navbar-nav .nav-link {
        padding: 10px 0;
        margin-left: 0;
    }
}

@media (min-width: 992px) {
    .navbar-light {
        position: relative;
        /* Changed from absolute to relative to prevent overlap */
        width: 100%;
        top: 0;
        left: 0;
        border-bottom: 1px solid rgba(0, 0, 0, .05);
        z-index: 999;
    }

    .sticky-top.navbar-light {
        position: fixed;
        top: 0;
        background: var(--bs-light) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
}

/*** Search Result Specific Styles ***/
.result-card {
    background: white;
    border-radius: 1.8rem;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    padding: 2rem;
    transition: all 0.3s;
}

.success-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #dcfce7;
    color: #15803d;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.student-profile {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 1.5rem 0;
}

.student-photo {
    width: 150px;
    height: 150px;
    background: #eef2ff;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bs-secondary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    flex: 1;
}

.detail-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid #e2edf2;
}

.detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #4a6a7a;
    margin-bottom: 4px;
}

.detail-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--bs-dark);
    text-transform: uppercase;
}

.qr-section {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    border-top: 1px solid #e2edf2;
    padding-top: 2rem;
}

.preview-box {
    margin-top: 2rem;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #e2edf2;
}

.preview-header {
    background: #f8fafc;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}


/* Backend status spacing (fixed header + status bar) */
#backendStatus {
    margin-top: 0px !important;
    border-radius: 0;
    border-left: none;
    border-right: none;
    position: relative;
    z-index: 50;
}

/* Footer styling to ensure data is visible */
.footer {
    background: var(--bs-dark);
    color: #ffffff;
}

.footer a,
.footer p,
.footer h4,
.footer .btn-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.footer .btn-link:hover,
.footer a:hover {
    color: #f16334 !important;
}

/* Primary button hover keeps strong contrast for Google Drive upload button */
.btn.btn-primary:hover,
.btn-primary:focus {
    background-color: #d85226 !important;
    border-color: #d85226 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(241, 99, 52, 0.4) !important;
}

/* Admin & Login Portal Styles */
.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 1rem;
    min-height: calc(100vh - 200px);
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--bs-dark);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: 0.3s;
}

.form-group input:focus {
    border-color: var(--bs-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(241, 99, 52, 0.1);
}

.uppercase-input {
    text-transform: uppercase;
}

.primary-btn {
    background: var(--bs-primary);
    color: white;
    border: none;
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}

.primary-btn:hover {
    background: #d85226;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(241, 99, 52, 0.2);
}

.result-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    font-weight: 600;
}

.result-message.success {
    background: #dcfce7;
    color: #15803d;
}

.result-message.error {
    background: #fee2e2;
    color: #b91c1c;
}

.decoration {
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: var(--bs-primary);
    top: -100px;
    right: -100px;
}

.circle-2 {
    width: 400px;
    height: 400px;
    background: var(--bs-secondary);
    bottom: -150px;
    left: -150px;
}