/* ═══════════════════════════════════════════════════════════════════
   Envonix CRM — Login Page
   Modern, premium design with Inter font
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --green-500: #07a93d;
    --green-600: #059669;
    --green-700: #047857;
    --green-900: #064e3b;
    --green-light: #ecfdf5;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --red-50: #fef2f2;
    --red-500: #ef4444;
    --red-700: #b91c1c;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.06);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: var(--gray-50);
}

/* ── Page Layout ──────────────────────────────────────────────────── */
.login-page {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ── Brand Panel (Left) ───────────────────────────────────────────── */
.brand-panel {
    flex: 0 0 45%;
    background: linear-gradient(145deg, #064e3b 0%, #065f46 30%, #047857 65%, #059669 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 60px;
}

.brand-panel-inner {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 380px;
}

.brand-logo-wrap {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.brand-shield {
    font-size: 32px;
    color: var(--white);
}

.brand-name {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    line-height: 1;
}

.brand-tagline {
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.8);
    margin-bottom: 40px;
    font-weight: 400;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.feature-icon {
    font-size: 20px;
    color: rgba(255,255,255,0.7);
    flex-shrink: 0;
}

/* Decorative blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    filter: blur(60px);
}
.blob-1 {
    width: 350px; height: 350px;
    background: rgba(255,255,255,0.06);
    top: -80px; right: -80px;
}
.blob-2 {
    width: 250px; height: 250px;
    background: rgba(255,255,255,0.05);
    bottom: -60px; left: -40px;
}
.blob-3 {
    width: 180px; height: 180px;
    background: rgba(16, 185, 129, 0.2);
    bottom: 100px; right: 40px;
}

/* ── Form Panel (Right) ───────────────────────────────────────────── */
.form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--white);
    overflow-y: auto;
}

.form-card {
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Form Header ──────────────────────────────────────────────────── */
.form-header {
    text-align: center;
    margin-bottom: 36px;
}

.form-logo {
    width: 52px;
    height: 52px;
    background: var(--green-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--green-500);
    font-size: 26px;
}

.form-header h2 {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.form-header p {
    font-size: 0.9rem;
    color: var(--gray-500);
    font-weight: 400;
}

/* ── Alert Messages ───────────────────────────────────────────────── */
.messages-wrap {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-error {
    background: var(--red-50);
    color: var(--red-700);
    border: 1px solid #fecaca;
}

.alert-success {
    background: var(--green-light);
    color: var(--green-700);
    border: 1px solid #a7f3d0;
}

.alert-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* ── Form Fields ──────────────────────────────────────────────────── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    letter-spacing: 0.01em;
}

.field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 14px;
    font-size: 18px;
    color: var(--gray-400);
    pointer-events: none;
    transition: color 0.2s;
    z-index: 1;
}

.field-input {
    width: 100%;
    padding: 12px 44px 12px 44px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--gray-50);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field-input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

.field-input:focus {
    border-color: var(--green-500);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(7, 169, 61, 0.1);
}

.field-input:focus + .field-icon,
.field-wrap:focus-within .field-icon {
    color: var(--green-500);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s;
    z-index: 1;
}

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

.toggle-password .material-icons-round {
    font-size: 18px;
}

/* ── Form Options ─────────────────────────────────────────────────── */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -4px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.8375rem;
    color: var(--gray-700);
    font-weight: 500;
    user-select: none;
}

.remember-check {
    display: none;
}

.remember-custom {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--gray-300, #d1d5db);
    border-radius: 4px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.remember-check:checked ~ .remember-custom {
    background: var(--green-500);
    border-color: var(--green-500);
}

.remember-check:checked ~ .remember-custom::after {
    content: '';
    display: block;
    width: 4px;
    height: 7px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

.forgot-link {
    font-size: 0.8375rem;
    color: var(--green-600);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ── Submit Button ────────────────────────────────────────────────── */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 24px;
    background: linear-gradient(135deg, var(--green-500) 0%, var(--green-600) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(7, 169, 61, 0.35);
    margin-top: 4px;
    letter-spacing: 0.01em;
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--green-600) 0%, var(--green-700) 100%);
    box-shadow: 0 6px 20px rgba(7, 169, 61, 0.45);
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(7, 169, 61, 0.3);
}

.submit-btn .material-icons-round {
    font-size: 18px;
    transition: transform 0.2s;
}

.submit-btn:hover .material-icons-round {
    transform: translateX(3px);
}

/* ── Footer ───────────────────────────────────────────────────────── */
.form-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 32px;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .brand-panel {
        display: none;
    }
    .form-panel {
        padding: 32px 20px;
    }
}
