/* ==============================================================================
   SALES CRM - MODERN AUTHENTICATION PORTAL (MATCHING REFERENCE DESIGN)
   ============================================================================== */

:root {
    --primary-gradient: linear-gradient(90deg, #0284c7 0%, #2563eb 100%);
    --primary-gradient-hover: linear-gradient(90deg, #0369a1 0%, #1d4ed8 100%);
    --primary-blue: #2563eb;
    --primary-cyan: #0284c7;
    --focus-cyan: #38bdf8;
    --focus-glow: rgba(56, 189, 248, 0.28);
    
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --card-border: rgba(226, 232, 240, 0.85);
    
    --text-heading: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --input-bg: #edf4fb;
    --input-border: #dbeafe;
    --input-color: #0f172a;
    
    --radius-card: 24px;
    --radius-input: 12px;
    --radius-btn: 12px;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==============================================================================
   BACKGROUND ATMOSPHERE & TECHNICAL GRID
   ============================================================================== */

/* Ambient Glowing Orbs matching reference image (Soft cyan top-left, soft purple bottom-right) */
.ambient-glow-left {
    position: fixed;
    top: -12%;
    left: -12%;
    width: 60vw;
    height: 60vh;
    max-width: 800px;
    max-height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, rgba(56, 189, 248, 0.05) 50%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.ambient-glow-right {
    position: fixed;
    bottom: -15%;
    right: -15%;
    width: 65vw;
    height: 65vh;
    max-width: 900px;
    max-height: 900px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, rgba(129, 140, 248, 0.04) 50%, transparent 70%);
    filter: blur(95px);
    pointer-events: none;
    z-index: 0;
}

/* Subtle Graph / Grid overlay matching reference image */
.tech-grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(to right, rgba(148, 163, 184, 0.10) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.10) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
}

/* ==============================================================================
   LOGIN CARD CONTAINER
   ============================================================================== */

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 24px;
    position: relative;
    z-index: 10;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    box-shadow: 
        0 24px 50px -12px rgba(15, 23, 42, 0.08),
        0 8px 24px -4px rgba(15, 23, 42, 0.03),
        0 0 1px 1px rgba(255, 255, 255, 0.9) inset;
    padding: 44px 38px 40px 38px;
    position: relative;
    backdrop-filter: blur(8px);
}

/* ==============================================================================
   BRAND SQUIRCLE BADGE (Top Center)
   ============================================================================== */

.card-brand-badge {
    width: 66px;
    height: 66px;
    background: #0f172a;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px auto;
    box-shadow: 
        0 12px 24px -6px rgba(15, 23, 42, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    transition: var(--transition);
}

.card-brand-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px -6px rgba(15, 23, 42, 0.35);
}

/* ==============================================================================
   TYPOGRAPHY
   ============================================================================== */

.login-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-heading);
    text-align: center;
    letter-spacing: -0.4px;
    margin-bottom: 6px;
    line-height: 1.25;
}

.login-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 26px;
    line-height: 1.4;
}

/* ==============================================================================
   ALERTS / NOTIFICATIONS
   ============================================================================== */

.alert-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.4;
    margin-bottom: 20px;
    animation: fadeInSlide 0.25s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.alert-box i {
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ==============================================================================
   FORM CONTROLS & INPUTS
   ============================================================================== */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.field-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    letter-spacing: -0.1px;
}

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

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--text-light);
    font-size: 16px;
    pointer-events: none;
    transition: var(--transition);
}

.field-input {
    width: 100%;
    height: 48px;
    padding: 10px 42px 10px 42px;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-input);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--input-color);
    outline: none;
    transition: var(--transition);
}

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

/* Focused input matching user's reference image glowing cyan border */
.field-input:focus {
    background: #ffffff;
    border-color: var(--focus-cyan);
    box-shadow: 0 0 0 3.5px var(--focus-glow);
}

.field-input:focus ~ .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary-cyan);
}

/* Password Visibility Toggle */
.toggle-password-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 17px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    outline: none;
}

.toggle-password-btn:hover {
    color: #475569;
}

/* Options Row (Remember & Demo Hint) */
.options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    margin-top: -2px;
    margin-bottom: 4px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: #475569;
    user-select: none;
    font-weight: 500;
}

.remember-checkbox {
    width: 15px;
    height: 15px;
    accent-color: var(--primary-blue);
    cursor: pointer;
    border-radius: 4px;
}

.demo-badge-fill {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--primary-cyan);
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.demo-badge-fill:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0369a1;
}

/* ==============================================================================
   SIGN IN BUTTON (Gradient Blue matching reference image)
   ============================================================================== */

.btn-signin {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: var(--radius-btn);
    background: var(--primary-gradient);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 22px -4px rgba(37, 99, 235, 0.42);
    transition: var(--transition);
    margin-top: 6px;
    letter-spacing: -0.1px;
}

.btn-signin:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-1.5px);
    box-shadow: 0 12px 26px -4px rgba(37, 99, 235, 0.52);
}

.btn-signin:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px -2px rgba(37, 99, 235, 0.35);
}

.btn-signin i {
    font-size: 13px;
    transition: transform 0.2s ease;
}

.btn-signin:hover i {
    transform: translateX(3px);
}

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

@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }
    .login-card {
        padding: 36px 24px 32px 24px;
        border-radius: 20px;
    }
}
