/* ══════════════════════════════════════════════
   LOGIN – UCAD Chatbot Admin (Bootstrap 5)
   ══════════════════════════════════════════════ */
:root {
    --ucad-primary: #1f5993;
    --ucad-primary-dark: #163f6b;
    --ucad-accent-gold: #f3b40d;
    --ucad-bg-light: #f6f7f8;
}

/* ── Base ── */
html, body {
    height: 100%;
    margin: 0;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ── */
.login-wrapper {
    height: 100vh;
    overflow: hidden;
}
.login-wrapper > .row {
    height: 100%;
}

/* ══════ LEFT PANEL ══════ */
.left-panel {
    background: linear-gradient(160deg, #245f9e 0%, var(--ucad-primary) 40%, #163f6b 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 3.5rem;
}

/* Grid pattern overlay */
.left-panel .pattern-overlay {
    position: absolute;
    inset: 0;
    opacity: .08;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Glow circles */
.glow-circle {
    position: absolute;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
.glow-bottom-left {
    bottom: -6rem;
    left: -6rem;
    background: rgba(255,255,255,.06);
}
.glow-top-right {
    top: -6rem;
    right: -6rem;
    background: rgba(243,180,13,.1);
}
.gradient-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(22,63,107,.5), transparent);
    pointer-events: none;
}

/* Left content */
.left-content {
    max-width: 32rem;
}

.logo-box {
    background: #fff;
    padding: .25rem;
    border-radius: .5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    display: inline-block;
}
.logo-img {
    height: 5rem;
    width: auto;
    display: block;
}

.hero-heading {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -.025em;
    margin-bottom: 1.25rem;
    color: #fff;
}

.accent-bar {
    width: 5rem;
    height: 4px;
    background: var(--ucad-accent-gold);
    border-radius: 2px;
}

.hero-description {
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(226,232,240,.85);
    max-width: 28rem;
}

.badge-motto {
    font-size: .9rem;
    font-weight: 500;
    color: rgba(255,255,255,.75);
}
.motto-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    flex-shrink: 0;
}
.motto-icon .material-symbols-outlined {
    font-size: 1.25rem;
}

/* ══════ RIGHT PANEL ══════ */
.right-panel {
    background-color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
}

.form-container {
    width: 100%;
    max-width: 26rem;
}

/* Mobile logo */
.mobile-logo-img {
    height: 4rem;
    width: auto;
}

/* Headings */
.signin-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: #0f172a;
}
.signin-subtitle {
    color: #64748b;
    font-size: .95rem;
}

/* ── Form Controls ── */
.form-label-custom {
    font-size: .875rem;
    font-weight: 600;
    color: #334155;
}

.input-icon-wrapper {
    position: relative;
}
.input-icon-wrapper .icon-left {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.25rem;
    pointer-events: none;
    z-index: 4;
}
.input-icon-wrapper .form-control {
    padding-left: 3rem;
    padding-right: 1rem;
    padding-top: .875rem;
    padding-bottom: .875rem;
    border-radius: .75rem;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    font-size: .925rem;
    color: #0f172a;
    transition: border-color .2s, box-shadow .2s;
    height: auto;
}
.input-icon-wrapper .form-control::placeholder {
    color: #94a3b8;
}
.input-icon-wrapper .form-control:focus {
    border-color: var(--ucad-primary);
    box-shadow: 0 0 0 3px rgba(31,89,147,.18);
    background-color: #fff;
}
.input-icon-wrapper.has-toggle .form-control {
    padding-right: 3.25rem;
}

/* Toggle password */
.btn-toggle-password {
    position: absolute;
    right: .85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    padding: 0;
    cursor: pointer;
    transition: color .2s;
    z-index: 4;
    line-height: 1;
}
.btn-toggle-password:hover {
    color: #475569;
}
.btn-toggle-password .material-symbols-outlined {
    font-size: 1.25rem;
}

/* Forgot */
.forgot-link {
    font-size: .8rem;
    font-weight: 500;
    color: var(--ucad-primary);
    text-decoration: none;
    transition: opacity .2s;
    white-space: nowrap;
}
.forgot-link:hover {
    opacity: .75;
    color: var(--ucad-primary);
}

/* Checkbox */
.form-check-input:checked {
    background-color: var(--ucad-primary);
    border-color: var(--ucad-primary);
}
.form-check-input:focus {
    box-shadow: 0 0 0 .25rem rgba(31,89,147,.25);
    border-color: var(--ucad-primary);
}
.form-check-label {
    font-size: .875rem;
    font-weight: 500;
    color: #475569;
}

/* Submit button */
.btn-login {
    width: 100%;
    padding: .95rem 1rem;
    background-color: var(--ucad-accent-gold);
    color: #0f172a;
    font-weight: 700;
    border: none;
    border-radius: .75rem;
    font-size: .95rem;
    letter-spacing: .075em;
    box-shadow: 0 8px 20px -4px rgba(243,180,13,.25);
    transition: background-color .2s, box-shadow .2s, transform .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}
.btn-login:hover {
    background-color: #e0a50c;
    color: #0f172a;
    box-shadow: 0 10px 25px -4px rgba(243,180,13,.4);
    transform: translateY(-1px);
}
.btn-login:active {
    background-color: #cca00b;
    transform: translateY(0);
}

/* Support / footer */
.support-divider {
    border-top: 1px solid #f1f5f9;
}
.support-text {
    font-size: .875rem;
    color: #64748b;
}
.support-link {
    font-weight: 700;
    color: var(--ucad-primary);
    text-decoration: none;
}
.support-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}
.footer-copy {
    font-size: .65rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .15em;
    font-weight: 500;
}

/* ══════ RESPONSIVE ══════ */

/* Tablets (md) */
@media (min-width: 768px) {
    .right-panel {
        padding: 3rem 2.5rem;
    }
    .hero-heading {
        font-size: 2.25rem;
    }
    .left-panel {
        padding: 3rem 2.5rem;
    }
}

/* Large screens */
@media (min-width: 992px) {
    .right-panel {
        padding: 4rem 4rem;
    }
    .hero-heading {
        font-size: 2.75rem;
    }
    .left-panel {
        padding: 4rem 3.5rem;
    }
}

@media (min-width: 1200px) {
    .right-panel {
        padding: 5rem;
    }
}

/* Mobile: full form screen */
@media (max-width: 767.98px) {
    .login-wrapper {
        height: auto;
        min-height: 100vh;
    }
    .login-wrapper > .row {
        height: auto;
        min-height: 100vh;
    }
    .right-panel {
        min-height: 100vh;
        padding: 2.5rem 1.5rem;
        background: linear-gradient(180deg, #fff 0%, var(--ucad-bg-light, #f6f7f8) 100%);
    }
    .form-container {
        max-width: 100%;
    }
    .signin-title {
        font-size: 1.6rem;
    }
}