@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0091d5;
    --primary-hover: #007bb5;
    --text-dark: #2c3e50;
    --text-grey: #888888;
    --text-blue: #0091d5;
    --bg-page: #eef0f3;
    --bg-white: #ffffff;
    --bg-brand: linear-gradient(145deg, #f8f9fb 0%, #dde2ea 100%);
    --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--bg-page);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ── Card Shell ── */
.login-card {
    position: relative;
    width: 850px;
    height: 480px;
    border-radius: 6px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

/* ── Shared Panel Base ── */
.panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    transition: transform 0.55s cubic-bezier(0.77, 0, 0.175, 1),
                opacity   0.4s ease;
    will-change: transform, opacity;
}

/* ════════════════════════════════
   LOGIN STATE  (default)
   login-panel : left  (0%)
   brand-panel : right (50%)
   renew-panel : off-screen right (150%)
   ════════════════════════════════ */

.login-panel {
    left: 0%;
    background: var(--bg-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px;
    z-index: 2;
    opacity: 1;
}

.brand-panel {
    left: 50%;
    background: var(--bg-brand);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.renew-panel {
    left: 150%;        /* off-screen right — clipped by overflow:hidden */
    background: var(--bg-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px;
    z-index: 2;
}

/* ════════════════════════════════
   RENEW STATE
   login-panel : off-screen left (-100%)
   brand-panel : left (0%)  → slides left
   renew-panel : right (50%) → slides in
   ════════════════════════════════ */

.login-card.renew-mode .login-panel {
    transform: translateX(-100%);
    opacity: 0;
}

.login-card.renew-mode .brand-panel {
    transform: translateX(-100%);   /* 50% → 0% (moves to left half) */
}

.login-card.renew-mode .renew-panel {
    /* Element width = 50% of card. -200% of that = -100% of card.
       So: left:150% + translateX(-200%) = 50%  →  right half ✓ */
    transform: translateX(-200%);
}

/* ── Typography ── */
.panel h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    animation: fadeUp 0.5s ease both;
}

.panel .subtitle {
    color: var(--text-grey);
    font-size: 12.5px;
    margin-bottom: 36px;
    animation: fadeUp 0.5s 0.05s ease both;
}

/* ── Input Groups ── */
.input-group {
    position: relative;
    border-bottom: 1.5px solid #e0e0e0;
    margin-bottom: 24px;
    transition: border-color 0.25s;
    animation: fadeUp 0.5s 0.1s ease both;
}

.input-group:focus-within {
    border-color: var(--primary);
}

.input-group i {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 13px;
    transition: color 0.25s;
}

.input-group:focus-within i {
    color: var(--primary);
}

.input-group input {
    width: 100%;
    border: none;
    padding: 11px 10px 11px 28px;
    font-size: 13.5px;
    background: transparent;
    outline: none;
    font-family: inherit;
    color: var(--text-dark);
}

.input-group .eye-icon {
    left: auto;
    right: 0;
    cursor: pointer;
    color: #ccc;
}

.input-group .eye-icon:hover {
    color: var(--primary);
}

/* ── Renew Link ── */
.renew-link {
    text-align: right;
    font-size: 12px;
    color: var(--text-grey);
    margin-bottom: 28px;
    cursor: pointer;
    animation: fadeUp 0.5s 0.15s ease both;
    transition: color 0.2s;
}

.renew-link:hover {
    color: var(--primary);
}

/* ── Login Button ── */
.btn-login {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 4px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 8px 24px rgba(0, 145, 213, 0.35);
    transition: background 0.25s, box-shadow 0.25s, transform 0.15s;
    animation: fadeUp 0.5s 0.2s ease both;
}

.btn-login:hover {
    background: var(--primary-hover);
    box-shadow: 0 12px 30px rgba(0, 145, 213, 0.45);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

/* ── Footer ── */
.login-footer {
    margin-top: auto;
    text-align: center;
    font-size: 11px;
    padding-top: 28px;
    animation: fadeUp 0.5s 0.25s ease both;
}

.login-footer .licensed  { color: var(--text-blue); margin-bottom: 3px; }
.login-footer .copyright { color: var(--text-grey); }

/* ── Brand Panel ── */
.logo-box {
    text-align: center;
    margin-bottom: 60px;
}

.logo-box img {
    width: 260px;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
    animation: logoFloat 3s ease-in-out infinite;
}

.contact-box {
    text-align: center;
    color: #888;
    font-size: 12px;
}

.contact-box p {
    margin-bottom: 10px;
    font-weight: 500;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    color: #777;
}

.contact-item i {
    font-size: 12px;
    color: var(--primary);
}

.version-tag {
    position: absolute;
    bottom: 10px;
    right: 14px;
    font-size: 10px;
    color: #bbb;
}

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (Max Width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        padding: 20px 0;
    }

    .login-card {
        width: 90%;
        max-width: 400px;
        height: auto;
        display: flex;
        flex-direction: column;
        transform: none !important;
    }
    
    .panel {
        position: static !important;
        width: 100%;
        height: auto;
        transform: none !important;
        left: 0 !important;
        opacity: 1 !important;
        transition: none !important;
    }
    
    .brand-panel {
        display: flex !important;
        order: -1;
        padding: 30px 20px 0px; /* Reduced bottom padding */
    }
    
    .logo-box {
        margin-bottom: 0;
    }
    
    .logo-box img {
        width: 180px; /* appropriately sized logo */
    }
    
    /* Hide desktop footer elements to keep the mobile card clean */
    .contact-box, .version-tag {
        display: none !important;
    }
    
    .login-panel {
        padding: 20px 30px 30px;
    }
    
    .renew-panel {
        display: none !important;
    }
    
    .login-card.renew-mode .login-panel {
        display: none !important;
    }
    
    .login-card.renew-mode .renew-panel {
        display: flex !important;
        padding: 20px 30px 30px;
    }
}