/* =============================================
   Processmed Landing Page
   Colors matched to logo:
   - Navy Blue: #1a3668
   - Red: #e4202c
   - Light accents: #f0f4fa
   ============================================= */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    background: #f0f4fa;
    overflow-x: hidden;
}

/* ---- Layout ---- */
.landing-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---- Left Brand Panel ---- */
.brand-panel {
    flex: 1 1 58%;
    background: linear-gradient(160deg, #1a3668 0%, #0f2248 50%, #162d55 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
}

/* Decorative background shapes */
.brand-panel::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(228, 32, 44, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    border-radius: 50%;
}

.brand-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    width: 100%;
}

/* Logo */
.logo-area {
    margin-bottom: 20px;
}

.logo-img {
    height: 90px;
    width: auto;
    background: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Tagline */
.tagline {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    margin-bottom: 44px;
    letter-spacing: 0.02em;
}

/* ---- Features Grid ---- */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 44px;
}

.feature-card {
    display: flex;
    gap: 14px;
    padding: 18px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.feature-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(228, 32, 44, 0.35);
    transform: translateY(-2px);
}

.feature-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #e4202c, #c9192a);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.feature-icon svg {
    width: 18px;
    height: 18px;
    color: #fff;
}

.feature-text h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
}

.feature-text p {
    font-size: 0.75rem;
    line-height: 1.45;
    color: rgba(255,255,255,0.55);
    font-weight: 300;
}

/* Brand footer */
.brand-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.brand-footer p {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
}

/* ---- Right Login Panel ---- */
.login-panel {
    flex: 1 1 42%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    background: #fff;
    position: relative;
}

/* Subtle top accent bar on login panel */
.login-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1a3668, #e4202c);
}

.login-content {
    width: 100%;
    max-width: 400px;
}

/* Mobile logo (hidden on desktop) */
.login-logo-mobile {
    display: none;
    margin-bottom: 24px;
    text-align: center;
}

.logo-img-mobile {
    height: 70px;
    width: auto;
}

/* Login header */
.login-header {
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a3668;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 0.95rem;
    color: #7a8599;
    font-weight: 400;
}

/* ---- Form ---- */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #3a4a63;
    font-weight: 500;
    font-size: 0.85rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #a0aec0;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1a3668;
    background: #f8fafc;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.input-wrapper input::placeholder {
    color: #a0aec0;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #1a3668;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 54, 104, 0.08);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: #1a3668;
}

/* Checkbox */
.checkbox-group {
    margin-bottom: 26px !important;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.88rem !important;
    color: #5a6a82 !important;
    font-weight: 400 !important;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1a3668;
    cursor: pointer;
}

/* Login button */
.btn-login {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1a3668, #243f6c);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s, transform 0.15s, box-shadow 0.3s;
    box-shadow: 0 4px 14px rgba(26, 54, 104, 0.25);
}

.btn-login:hover {
    background: linear-gradient(135deg, #e4202c, #c9192a);
    box-shadow: 0 4px 18px rgba(228, 32, 44, 0.3);
    transform: translateY(-1px);
}

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

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-text { transition: none; }

.btn-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}

.btn-login:hover .btn-arrow {
    transform: translateX(3px);
}

/* Error message */
.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 22px;
    font-size: 0.85rem;
    border: 1px solid #fecaca;
    animation: shake 0.35s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* View switcher */
.view-switcher {
    margin-top: 24px;
    text-align: center;
}

.view-switch-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1a3668;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    transition: all 0.2s;
    background: #f8fafc;
}

.view-switch-link:hover {
    border-color: #1a3668;
    background: #f0f4fa;
}

.view-switch-link svg {
    flex-shrink: 0;
}

/* Login footer */
.login-footer {
    margin-top: 40px;
    text-align: center;
}

.login-footer p {
    font-size: 0.82rem;
    color: #a0aec0;
}

.brand-text {
    font-weight: 700;
    font-size: 0.88rem;
}

.brand-process {
    color: #1a3668;
}

.brand-med {
    color: #e4202c;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}

.brand-content {
    animation: fadeInUp 0.6s ease both;
}

.login-content {
    animation: fadeInUp 0.6s ease 0.15s both;
}

.feature-card:nth-child(1) { animation: fadeInUp 0.5s ease 0.2s both; }
.feature-card:nth-child(2) { animation: fadeInUp 0.5s ease 0.3s both; }
.feature-card:nth-child(3) { animation: fadeInUp 0.5s ease 0.4s both; }
.feature-card:nth-child(4) { animation: fadeInUp 0.5s ease 0.5s both; }
.feature-card:nth-child(5) { animation: fadeInUp 0.5s ease 0.6s both; }
.feature-card:nth-child(6) { animation: fadeInUp 0.5s ease 0.7s both; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .landing-wrapper {
        flex-direction: column;
    }

    .brand-panel {
        display: none;
    }

    .login-panel {
        flex: 1;
        min-height: 100vh;
        padding: 40px 24px;
    }

    .login-panel::before {
        height: 4px;
    }

    .login-logo-mobile {
        display: block;
    }

    .login-content {
        max-width: 100%;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-panel {
        padding: 32px 18px;
    }

    .input-wrapper input {
        padding: 12px 12px 12px 40px;
        font-size: 0.9rem;
    }

    .btn-login {
        padding: 13px 16px;
    }
}
