:root {
    --primary-blue: #14639c;
    --primary-blue-hover: #0f4e7c;
    --accent-teal: #0ea5e9;
    --accent-purple: #7c3aed;
    --accent-emerald: #10b981;
    --field-bg: #e8f0fe;
    --border-color: #cbd5e1;
    --focus-border: #3b82f6;
    --focus-ring: rgba(59, 130, 246, 0.28);
    --text-dark: #0f172a;
    --text-label: #64748b;
    --danger: #dc2626;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    position: relative;
    overflow-x: hidden;
    /* Vibrant Multi-Stop Colorful Background */
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #0369a1 70%, #0d9488 100%);
}

/* Decorative Colorful Floating Blobs */
.color-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(75px);
    opacity: 0.65;
    z-index: 0;
    pointer-events: none;
}
.blob-1 {
    width: 340px;
    height: 340px;
    background: #ec4899;
    top: -90px;
    left: -80px;
}
.blob-2 {
    width: 360px;
    height: 360px;
    background: #38bdf8;
    bottom: -100px;
    right: -80px;
}
.blob-3 {
    width: 260px;
    height: 260px;
    background: #34d399;
    top: 50%;
    left: 65%;
    transform: translate(-50%, -50%);
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
    z-index: 1;
    animation: cardEntrance 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card {
    background: #ffffff;
    border-radius: 20px;
    padding: clamp(28px, 5vw, 40px) clamp(22px, 5vw, 34px);
    box-shadow: 0 25px 55px -12px rgba(15, 23, 42, 0.45);
    position: relative;
    overflow: hidden;
}

/* Colorful Top Rainbow Accent Strip */
.card-accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #ec4899, #8b5cf6, #3b82f6, #10b981);
}

.header {
    text-align: center;
    margin-bottom: 26px;
}

.brand-badge {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 15px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.header h1 {
    font-size: clamp(1.35rem, 3vw, 1.6rem);
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.header p {
    font-size: 0.875rem;
    color: var(--text-label);
    margin-top: 4px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

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

/* Split Input Group (Matches Reference Image) */
.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    border-radius: 10px;
}

.input-addon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: #64748b;
    flex-shrink: 0;
}

.addon-left {
    border-right: none;
    border-radius: 10px 0 0 10px;
}

.addon-right {
    border-left: none;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.addon-right:hover {
    background-color: #f8fafc;
    color: var(--text-dark);
}

.input-group input {
    flex: 1;
    min-width: 0;
    padding: 13px 15px;
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--text-dark);
    background-color: var(--field-bg);
    border: 1px solid var(--border-color);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.input-group-left input {
    border-radius: 0 10px 10px 0;
}

.input-group-right input {
    border-radius: 10px 0 0 10px;
}

.input-group input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Soft Blue Focus Ring (Matches Reference Image) */
.input-group input:focus {
    border-color: var(--focus-border);
    box-shadow: 0 0 0 3.5px var(--focus-ring);
    z-index: 2;
}

/* Primary Sign In Button */
.btn-submit {
    width: 100%;
    padding: 14px 18px;
    margin-top: 6px;
    background: linear-gradient(135deg, #14639c 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 8px 20px rgba(20, 99, 156, 0.3);
    transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit:hover {
    filter: brightness(1.07);
    box-shadow: 0 12px 24px rgba(20, 99, 156, 0.38);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(1px);
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}

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

/* Mobile Responsive Adjustments */
@media (max-width: 480px) {
    body {
        padding: 14px;
    }
    .input-group input {
        font-size: 16px; /* Prevents mobile Safari auto-zoom */
        padding: 14px;
    }
    .input-addon {
        width: 50px; /* Comfortable touch target for the eye toggle */
    }
}