﻿/* ============================================
   GC Tissa – Modern Student Login
   Separate CSS file (drop into /old/css/ or
   link after application.min.css)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Reset & base ─────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Background ───────────────────────────── */
body,
.mdl-layout.login {
    min-height: 100vh;
    font-family: 'Inter', 'Roboto', sans-serif;
    background: #f0f2f5;
}

/* ── Layout centering ─────────────────────── */
.mdl-layout__content {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px 16px;
    background: transparent !important;
}

/* ── Card ─────────────────────────────────── */
.mdl-card.mdl-card__login {
    width: 100% !important;
    max-width: 420px !important;
    min-height: unset !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 24px !important;
    box-shadow: 0 8px 40px rgba(0,0,0,0.10) !important;
    overflow: visible !important;
    padding: 0 !important;
    animation: cardIn .6s cubic-bezier(.22,.68,0,1.2) both;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(32px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mdl-card__supporting-text {
    width: 100% !important;
    padding: 40px 36px 36px !important;
    overflow: visible !important;
}

/* ── Logo ─────────────────────────────────── */
.mdl-cell img {
    width: 84px !important;
    height: 84px !important;
    object-fit: contain;
    border-radius: 16px !important;
    padding: 10px !important;
    background: rgba(255,255,255,.95) !important;
    box-shadow: 0 4px 20px rgba(79,70,229,.4);
    margin-bottom: 4px;
}

/* ── Heading ──────────────────────────────── */
.login-name.text-color--white {
    display: block;
    text-align: center;
    font-size: 1.45rem !important;
    font-weight: 700 !important;
    letter-spacing: .02em;
    color: #111827 !important;
    margin-bottom: 4px;
}

    .login-name.text-color--white::after {
        content: '';
        display: block;
        width: 40px;
        height: 3px;
        background: linear-gradient(90deg, #4F46E5, #06B6D4);
        border-radius: 99px;
        margin: 10px auto 0;
    }

/* ── Session / error label ────────────────── */
.mdl-card__login span[id*="lbl_session"],
.mdl-card__login span[id$="sessionmesg"] {
    display: block;
    margin-bottom: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: #c51f1f !important;
    font-size: .85rem;
    font-weight: 500 !important;
}

/* ── MDL textfield overrides ──────────────── */
.mdl-textfield.full-size {
    width: 100% !important;
    margin-bottom: 6px;
    padding: 0 !important;
    position: relative;
}

.mdl-textfield__input,
input.mdl-textfield__input {
    width: 100% !important;
    height: 52px !important;
    padding: 14px 16px 0 !important;
    background: #f9fafb !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 12px !important;
    color: #111827 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 1rem !important;
    outline: none !important;
    transition: border-color .25s, background .25s, box-shadow .25s;
    caret-color: #4F46E5;
}

    .mdl-textfield__input:focus {
        border-color: #4F46E5 !important;
        background: #fff !important;
        box-shadow: 0 0 0 3px rgba(79,70,229,.15) !important;
    }

    .mdl-textfield__input::placeholder {
        color: transparent;
    }

/* Floating label */
.mdl-textfield__label {
    position: absolute !important;
    top: 50% !important;
    left: 16px !important;
    transform: translateY(-50%) !important;
    color: #9ca3af !important;
    font-size: .9rem !important;
    pointer-events: none;
    transition: all .2s ease;
    background: transparent !important;
}

.mdl-textfield__input:focus ~ .mdl-textfield__label,
.mdl-textfield__input:not(:placeholder-shown) ~ .mdl-textfield__label,
.mdl-textfield--is-focused .mdl-textfield__label,
.mdl-textfield--is-dirty .mdl-textfield__label {
    top: 10px !important;
    font-size: 1rem !important;
    color: #4F46E5 !important;
    transform: translateY(0) !important;
}

/* ── Password toggle ──────────────────────── */
.pwd-wrapper {
    position: relative;
}

.pwd-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    transition: color .2s;
    z-index: 10;
}

    .pwd-toggle:hover {
        color: #4F46E5;
    }

    .pwd-toggle svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* shift password input to not overlap eye icon */
.pwd-wrapper .mdl-textfield__input {
    padding-right: 46px !important;
}

/* ── Forgot / sign-up links ───────────────── */
a.login-link {
    font-size: 1rem !important;
    color: #6b7280 !important;
    text-decoration: none !important;
    transition: color .2s;
    display: inline-block;
    margin-top: 4px;
}

    a.login-link:hover {
        color: #4F46E5 !important;
    }

/* ── Submit cell ──────────────────────────── */
.submit-cell {
    display: flex !important;
    align-items: center !important;
    margin-top: 8px !important;
}

    /* Sign-up link inside submit row */
    .submit-cell a[href*="Sign_In"] {
        font-size: 1rem !important;
        color: #4F46E5 !important;
        font-weight: 500 !important;
        white-space: nowrap;
        text-decoration: none;
        flex-shrink: 0;
    }

        .submit-cell a[href*="Sign_In"]:hover {
            color: #111827 !important;
        }

    /* ── Login button ─────────────────────────── */
    .submit-cell > a[href="index.aspx"],
    .submit-cell > a[href*="index"] {
        display: block !important;
        flex: 1;
        text-decoration: none !important;
    }

.mdl-button.color--green,
input[type=submit].color--green,
.mdl-card__login .mdl-button {
    width: 100% !important;
    height: 48px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%) !important;
    color: #fff !important;
    font-family: 'Inter', sans-serif !important;
    font-size: .95rem !important;
    font-weight: 600 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 18px rgba(79,70,229,.45) !important;
    transition: transform .18s, box-shadow .18s, filter .18s !important;
    position: relative;
    overflow: hidden;
}

    .mdl-card__login .mdl-button::after {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(255,255,255,0);
        transition: background .18s;
    }

    .mdl-card__login .mdl-button:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 28px rgba(79,70,229,.55) !important;
        filter: brightness(1.08) !important;
    }

    .mdl-card__login .mdl-button:active {
        transform: translateY(0) !important;
        filter: brightness(.95) !important;
    }

/* ── MDL grid cleanup ─────────────────────── */
.mdl-grid {
    padding: 0 !important;
    gap: 14px 0;
}

.mdl-cell {
    margin: 0 !important;
    padding: 0 !important;
    gap: 10px;
}

    /* ── Divider line between sections ───────── */
    .mdl-cell:nth-child(3) {
        border-top: 1px solid #f3f4f6;
        padding-top: 16px !important;
    }

/* ── Scrollbar (webkit) ───────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 99px;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 480px) {
    .mdl-card__supporting-text {
        padding: 28px 20px 24px !important;
    }

    .mdl-card.mdl-card__login {
        border-radius: 18px !important;
    }
}
