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

:root {
    --blue: #1a3b8c;
    --blue-mid: #2952c4;
    --blue-light: #e8eeff;
    --dark: #0d1b3e;
    --gray: #7a849a;
    --border: #e8e8e8;
    --white: #ffffff;
    --red: #dc3545;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    background: var(--white);
    overflow: hidden;
}

/* ===== LEFT PANEL ===== */
.left-panel {
    width: 50%;
    background: linear-gradient(135deg, #1a3b8c 0%, #2952c4 50%, #1a3b8c 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 70px 56px;
    position: relative;
    overflow: hidden;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    background-image: url('images/warehousebg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Dark overlay on top of background image */
.left-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(13, 27, 62, 0.65);
    z-index: 1;
}

/* Decorative circle top-left */
.left-panel::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    z-index: 1;
}

.left-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.left-logo {
    width: 200px;
    max-width: 80%;
    margin-bottom: 36px;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
    animation: fadeUp 0.6s ease forwards;
}

.left-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 14px;
    animation: fadeUp 0.6s ease 0.1s both;
}

.left-sub {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    max-width: 340px;
    line-height: 1.7;
    margin-bottom: 36px;
    animation: fadeUp 0.6s ease 0.2s both;
}

.feature-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 420px;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 18px 22px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    animation: fadeUp 0.5s ease both;
}

.feature-card:nth-child(1) { animation-delay: 0.25s; }
.feature-card:nth-child(2) { animation-delay: 0.35s; }

.fc-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: rgba(41, 82, 196, 0.8);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 19px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.fc-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    text-align: left;
}

/* ===== RIGHT PANEL ===== */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 70px;
    background: var(--white);
}

.form-card {
    width: 100%;
    max-width: 420px;
}

.form-header {
    margin-bottom: 32px;
    animation: fadeUp 0.5s ease 0.1s both;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-title span {
    color: var(--blue-mid);
}

.form-subtitle {
    font-size: 0.97rem;
    color: var(--gray);
    font-weight: 400;
}

/* Error Alert */
.error-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff0f0;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--red);
    font-size: 0.92rem;
    font-weight: 500;
    margin-bottom: 22px;
    animation: fadeUp 0.4s ease both;
}

.error-alert i {
    font-size: 15px;
    flex-shrink: 0;
}

/* Form Groups */
.form-group {
    margin-bottom: 22px;
    animation: fadeUp 0.5s ease both;
}

.form-group:nth-child(1) { animation-delay: 0.2s; }
.form-group:nth-child(2) { animation-delay: 0.28s; }

.form-label {
    display: block;
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.input-wrap {
    position: relative;
}

.input-field {
    width: 100%;
    padding: 14px 18px 14px 46px;
    font-size: 0.97rem;
    font-family: 'Poppins', Arial, sans-serif;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: #fafafa;
    color: var(--dark);
    transition: all 0.25s ease;
    outline: none;
}

.input-field::placeholder {
    color: #c0c7d4;
}

.input-field:focus {
    border-color: var(--blue-mid);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(41, 82, 196, 0.1);
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #c0c7d4;
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s;
}

.input-field:focus ~ .input-icon {
    color: var(--blue-mid);
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #c0c7d4;
    font-size: 14px;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--gray);
}

.meta-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.forgot-link {
    font-size: 0.88rem;
    color: var(--blue-mid);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-row {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    animation: fadeUp 0.5s ease 0.35s both;
}

.btn-login {
    flex: 2;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', Arial, sans-serif;
    background: var(--blue-mid);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(41, 82, 196, 0.35);
}

.btn-login:hover {
    background: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(41, 82, 196, 0.4);
}

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

.btn-clear {
    flex: 1;
    padding: 14px;
    font-size: 0.97rem;
    font-weight: 500;
    font-family: 'Poppins', Arial, sans-serif;
    background: transparent;
    color: var(--gray);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-clear:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: var(--dark);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 32px 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: fadeUp 0.3s ease;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.modal-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.modal-sub {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 20px;
}

.modal-content .close {
    position: absolute;
    right: 18px;
    top: 14px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
}

.modal-content .close:hover {
    color: var(--dark);
}

.modal-input-wrap {
    margin-bottom: 16px;
}

.modal-content input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: 'Poppins', Arial, sans-serif;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: #fafafa;
    color: var(--dark);
    outline: none;
    transition: all 0.2s;
}

.modal-content input[type="email"]:focus {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px rgba(41, 82, 196, 0.1);
    background: var(--white);
}

.modal-btn {
    width: 100%;
    padding: 12px;
    background: var(--blue-mid);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.97rem;
    font-weight: 600;
    font-family: 'Poppins', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}

.modal-btn:hover {
    background: var(--blue);
    transform: translateY(-1px);
}

.account-info {
    background: var(--blue-light);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 16px 0 12px;
    font-size: 0.93rem;
    color: var(--dark);
    line-height: 1.8;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */

/* Small laptops / large tablets landscape (≤ 1100px) */
@media (max-width: 1100px) {
    .left-panel { padding: 52px 36px; }
    .left-logo  { width: 170px; margin-bottom: 28px; }
    .left-title { font-size: 1.85rem; }
    .left-sub   { font-size: 0.94rem; margin-bottom: 28px; }
    .right-panel { padding: 48px 44px; }
}

/* Tablets landscape (≤ 900px) */
@media (max-width: 900px) {
    .left-panel  { width: 46%; padding: 44px 28px; }
    .left-logo   { width: 150px; margin-bottom: 22px; }
    .left-title  { font-size: 1.65rem; margin-bottom: 10px; }
    .left-sub    { font-size: 0.88rem; margin-bottom: 22px; }
    .feature-card { padding: 14px 16px; gap: 14px; }
    .fc-icon     { width: 44px; height: 44px; min-width: 44px; font-size: 17px; }
    .fc-text     { font-size: 0.86rem; }
    .right-panel { padding: 40px 30px; }
    .form-title  { font-size: 1.7rem; }
}

/* Tablets portrait / large phones (≤ 768px) — stack vertically */
@media (max-width: 768px) {
    body {
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        height: auto;
        min-height: 100vh;
    }

    /* Left panel becomes a horizontal banner on top */
    .left-panel {
        width: 100%;
        min-height: unset;
        padding: 36px 24px 32px;
        border-radius: 0 0 24px 24px;
    }

    /* Always centered, compact */
    .left-content {
        max-width: 500px;
    }

    .left-logo   { width: 110px; margin-bottom: 16px; }
    .left-title  { font-size: 1.45rem; margin-bottom: 8px; }
    .left-sub    { font-size: 0.86rem; margin-bottom: 20px; max-width: 420px; }

    /* Feature cards side-by-side */
    .feature-cards {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        max-width: 500px;
    }

    .feature-card {
        flex: 1 1 45%;
        min-width: 180px;
        max-width: 240px;
        padding: 12px 14px;
        gap: 12px;
    }

    .fc-icon  { width: 38px; height: 38px; min-width: 38px; font-size: 15px; }
    .fc-text  { font-size: 0.8rem; }

    .right-panel { padding: 32px 28px 48px; }
    .form-card   { max-width: 100%; }
    .form-title  { font-size: 1.6rem; }
}

/* Small phones (≤ 600px) */
@media (max-width: 600px) {
    .left-panel  { padding: 28px 20px 26px; }
    .left-logo   { width: 90px; margin-bottom: 12px; }
    .left-title  { font-size: 1.25rem; margin-bottom: 6px; }
    .left-sub    { font-size: 0.82rem; margin-bottom: 16px; }

    .feature-cards { gap: 8px; }
    .feature-card  {
        flex: 1 1 100%;
        max-width: 340px;
        padding: 11px 14px;
        gap: 12px;
    }

    .fc-icon  { width: 36px; height: 36px; min-width: 36px; font-size: 14px; }
    .fc-text  { font-size: 0.79rem; }

    .right-panel   { padding: 26px 20px 44px; }
    .form-title    { font-size: 1.45rem; }
    .form-subtitle { font-size: 0.86rem; }
    .form-header   { margin-bottom: 24px; }

    .input-field {
        padding: 12px 16px 12px 42px;
        font-size: 0.91rem;
    }

    .btn-login,
    .btn-clear { padding: 12px; font-size: 0.92rem; }

    .modal-content { padding: 24px 20px; border-radius: 14px; }
    .error-alert   { font-size: 0.88rem; padding: 10px 14px; }
}

/* Extra small phones (≤ 400px) */
@media (max-width: 400px) {
    .left-panel  { padding: 22px 16px 20px; }
    .left-logo   { width: 76px; margin-bottom: 10px; }
    .left-title  { font-size: 1.1rem; }
    .left-sub    { font-size: 0.78rem; margin-bottom: 14px; }

    .feature-card { max-width: 100%; padding: 10px 12px; gap: 10px; }
    .fc-icon      { width: 32px; height: 32px; min-width: 32px; font-size: 13px; }
    .fc-text      { font-size: 0.76rem; }

    .right-panel  { padding: 22px 16px 36px; }
    .form-title   { font-size: 1.3rem; }
    .form-header  { margin-bottom: 20px; }

    .btn-row {
        flex-direction: column;
        gap: 10px;
    }

    .btn-login,
    .btn-clear {
        flex: unset;
        width: 100%;
        padding: 13px;
    }

    .error-alert { font-size: 0.82rem; }
}