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

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --primary-green: #16A34A;
    --primary-green-hover: #15803D;
    --emerald-accent: #10B981;
    --emerald-light: #ECFDF5;
    --emerald-border: #D1FAE5;
    --dark-bg-start: #07111F;
    --dark-bg-mid: #0B162C;
    --dark-bg-end: #0F172A;
    --slate-text: #64748B;
    --slate-dark: #0F172A;
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body.login-body {
    font-family: var(--font-sans);
    background-color: #FFFFFF;
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    margin: 0;
    color: #1E293B;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

/* ==========================================================================
   Full Screen Login Card Container
   ========================================================================== */
.login-card-container {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    max-width: 100vw;
    background: #FFFFFF;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    position: relative;
    animation: cardFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ==========================================================================
   Left Panel (Dark Gradient & SaaS Showcase - 42%)
   ========================================================================== */
.login-left-panel {
    flex: 0 0 42%;
    max-width: 42%;
    height: 100vh;
    background: linear-gradient(165deg, var(--dark-bg-start) 0%, var(--dark-bg-mid) 50%, var(--dark-bg-end) 100%);
    color: #FFFFFF;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow-y: auto;
}

/* Ambient glow orb behind illustration */
.login-left-panel::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, rgba(16, 185, 129, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.login-left-panel > * {
    position: relative;
    z-index: 2;
}

/* Left Brand Header */
.brand-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon-wrapper {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-icon-wrapper svg {
    width: 100%;
    height: 100%;
}

.brand-text h1 {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
    color: #FFFFFF;
    letter-spacing: -0.5px;
}

.brand-text h1 .brand-highlight {
    color: #10B981;
}

.brand-text p {
    font-size: 0.88rem;
    color: #94A3B8;
    margin: 4px 0 0 0;
    font-weight: 400;
}

/* Vector Illustration Section */
.hero-illustration {
    margin: 20px auto;
    width: 100%;
    max-width: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-illustration svg {
    width: 100%;
    height: auto;
    max-height: 220px;
}

/* Features List */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.feature-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #34D399;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: 0.96rem;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: #F8FAFC;
}

.feature-content p {
    font-size: 0.84rem;
    color: #94A3B8;
    margin: 0;
    line-height: 1.4;
}

/* Left Footer */
.left-footer {
    font-size: 0.80rem;
    color: #64748B;
    margin-top: auto;
    padding-top: 12px;
}

/* ==========================================================================
   Right Panel (Clean White Full-Height Center - 58%)
   ========================================================================== */
.login-right-panel {
    flex: 1 1 58%;
    max-width: 58%;
    height: 100vh;
    background: #FFFFFF;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow-y: auto;
}

/* Top Action Header */
.right-top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.theme-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #64748B;
    cursor: default;
}

.theme-toggle-pill i {
    font-size: 0.9rem;
}

/* Center Form Container */
.form-container {
    width: 100%;
    max-width: 460px;
    margin: auto;
    padding: 20px 0;
}

/* Form Headings */
.form-header {
    margin-bottom: 28px;
}

.form-header h2 {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--slate-dark);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.form-header p {
    font-size: 0.98rem;
    color: var(--slate-text);
    margin: 0;
}

/* Inputs & Form Groups */
.form-group-custom {
    margin-bottom: 20px;
}

.form-group-custom label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    display: block;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-prefix {
    position: absolute;
    left: 16px;
    color: #94A3B8;
    font-size: 1.15rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.custom-input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 46px;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    color: #1E293B;
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.custom-input:focus {
    outline: none;
    border-color: var(--emerald-accent);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.custom-input:focus + .input-icon-prefix,
.input-wrapper:focus-within .input-icon-prefix {
    color: var(--emerald-accent);
}

.custom-input::placeholder {
    color: #94A3B8;
    font-size: 0.92rem;
}

.input-btn-suffix {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94A3B8;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s ease;
}

.input-btn-suffix:hover {
    color: #475569;
}

/* Remember Me & Forgot Password */
.form-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.88rem;
}

.custom-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox-wrapper input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--primary-green);
    cursor: pointer;
    border-radius: 4px;
}

.custom-checkbox-wrapper label {
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
}

.forgot-password-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.forgot-password-link:hover {
    color: var(--primary-green-hover);
    text-decoration: underline;
}

/* Green Submit Button */
.btn-submit-green {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-submit-green:hover:not(:disabled) {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
    transform: translateY(-1px);
}

.btn-submit-green:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.btn-submit-green:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

/* Subtle Divider */
.security-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0 20px 0;
}

.security-divider::before,
.security-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #E2E8F0;
}

.security-divider span {
    padding: 0 12px;
    font-size: 0.78rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Security Guarantee Banner */
.security-banner {
    background: var(--emerald-light);
    border: 1px solid var(--emerald-border);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.security-banner-icon {
    font-size: 1.4rem;
    color: #10B981;
    flex-shrink: 0;
}

.security-banner-text h5 {
    font-size: 0.88rem;
    font-weight: 600;
    color: #065F46;
    margin: 0 0 2px 0;
}

.security-banner-text p {
    font-size: 0.80rem;
    color: #047857;
    margin: 0;
    line-height: 1.3;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 991px) {
    .login-left-panel {
        flex: 0 0 45%;
        max-width: 45%;
        padding: 32px 28px;
    }

    .login-right-panel {
        flex: 0 0 55%;
        max-width: 55%;
        padding: 32px 32px;
    }
}

@media (max-width: 767px) {
    .login-card-container {
        flex-direction: column;
        width: 100vw;
        height: 100vh;
    }

    .login-left-panel {
        display: none !important;
    }

    .login-right-panel {
        flex: 1 0 100%;
        max-width: 100%;
        width: 100%;
        height: 100vh;
        padding: 24px 20px;
    }

    .form-container {
        max-width: 100%;
        padding: 10px 0;
    }

    .form-header h2 {
        font-size: 1.75rem;
    }
}
