﻿/* ===== Card + Auth + Form Styles ===== */
.card-wrap {
    max-width: 980px;
    margin: 40px auto;
    padding: 0;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
}

    .card-wrap:before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, rgba(50,140,193,.15), rgba(244,162,97,.12));
        z-index: 0;
    }

.inner {
    position: relative;
    z-index: 1;
}

/* ===== News Section ===== */
.news-box {
    background: linear-gradient(180deg,#eef6ff,#f9fbff);
    padding: 22px;
    border-right: 1px dashed #dbeafe;
    overflow: hidden;
}

.news-title {
    font-weight: 700;
    text-align: center;
    letter-spacing: .4px;
}

.ticker {
    position: relative;
    height: 300px;
    overflow: hidden;
}

    .ticker ul {
        list-style: none;
        padding: 0;
        margin: 0;
        position: absolute;
        width: 100%;
        animation: scrollUp 12s linear infinite;
    }

    .ticker li {
        padding: 10px 12px;
        margin: 6px 0;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 6px 14px rgba(15,23,42,.08);
        transition: .3s;
    }

        .ticker li:hover {
            transform: translateX(6px);
            box-shadow: 0 10px 22px rgba(15,23,42,.12);
        }

@keyframes scrollUp {
    0% {
        transform: translateY(100%);
    }

    100% {
        transform: translateY(-120%);
    }
}

/* ===== Auth Section ===== */
.auth-wrap {
    padding: 28px 30px;
}

.auth-toggle-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Toggle container */
.auth-toggle {
    position: relative;
    display: flex;
    width: 240px;
    background: #f1f5f9;
    border-radius: 40px;
    padding: 4px;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

/* Toggle buttons */
.toggle-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    border-radius: 40px;
    transition: all .3s ease;
}

    .toggle-btn:hover {
        color: #1d4ed8;
    }

    .toggle-btn.active {
        color: #ffffff;
        background: linear-gradient(135deg, #328cc1, #1d4ed8);
        box-shadow: 0 6px 14px rgba(50,140,193,.35);
    }

/* ===== Form Inputs ===== */
.form-control {
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    transition: .25s;
}

    .form-control:focus {
        border-color: #328cc1;
        box-shadow: 0 0 0 .2rem rgba(50,140,193,.15);
    }

/* ===== Buttons ===== */
.btn-primary {
    background: linear-gradient(135deg,#328cc1,#1d4ed8);
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 700;
    transition: .3s;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(50,140,193,.35);
    }

.btn-success {
    background: linear-gradient(135deg,#328cc1,#1d4ed8);
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 700;
    transition: .3s;
}

    .btn-success:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(50,140,193,.35);
    }

/* ===== Animations ===== */
.fade-in {
    animation: fadeIn .5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ===== Modal Animation ===== */
.modal.fade .modal-dialog {
    transform: scale(0.85) translateY(20px);
    transition: all .35s ease;
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* ===== Eye Toggle ===== */
.eye-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    transition: all .25s ease;
    color: #64748b;
}

    .eye-toggle.active {
        color: #0d6efd;
        transform: translateY(-50%) scale(1.15);
    }

/* ================= MOBILE RESPONSIVE ONLY ================= */

/* Tablets & below */
@media (max-width: 991px) {

    .card-wrap {
        margin: 24px 12px;
        border-radius: 18px;
    }

    .news-box {
        padding: 18px;
    }

    .ticker {
        height: 220px;
    }

    .auth-wrap {
        padding: 22px 20px;
    }
}

/* Mobile phones */
@media (max-width: 768px) {

    /* Stack columns vertically */
    .card-wrap .row {
        flex-direction: column;
    }

    .news-box {
        border-right: none;
        border-bottom: 1px dashed #dbeafe;
    }

    .ticker {
        height: 180px;
    }

    .auth-toggle {
        width: 100%;
        max-width: 260px;
    }

    .toggle-btn {
        font-size: 14px;
        padding: 9px 0;
    }

    .form-control {
        font-size: 14px;
        padding: 11px 12px;
    }

    .btn-primary,
    .btn-success {
        font-size: 15px;
        padding: 11px 12px;
    }

    h5 {
        font-size: 1rem;
    }
}

/* Small phones */
@media (max-width: 480px) {

    .card-wrap {
        margin: 16px 8px;
        border-radius: 16px;
    }

    .news-title {
        font-size: 14px;
    }

    .ticker li {
        font-size: 13px;
        padding: 8px 10px;
    }

    .eye-toggle {
        right: 10px;
        font-size: 16px;
    }

    .helper {
        font-size: 13px;
    }
}

/* ===== WELCOME MODAL ===== */

.welcome-modal {
    backdrop-filter: blur(10px);
}

.welcome-content {
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #f4f7fb);
    animation: scaleIn 0.6s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.uni-name {
    font-weight: 800;
    font-size: 30px;
    color: #0d3b66;
}

.conf-name {
    font-weight: 600;
    color: #328cc1;
    letter-spacing: 1px;
}

.welcome-text {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

.regards {
    color: #555;
    font-style: italic;
}

/* Animation */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.validation-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 2px;
    display: block;
    font-weight: 500;
}

input.invalid {
    border-color: #dc3545;
}

/* FULL SCREEN LOADER */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LOADER BOX */
.loader-box {
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    text-align: center;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}