/* ============================================
   DESIGN SYSTEM - NUCLEO CONSULTING BRAND
   ============================================ */

:root {
    /* Nucleo Brand Colors (from actual logo) */
    --nucleo-blue: #4A9FD8;
    --nucleo-blue-light: #6BB5E3;
    --nucleo-blue-dark: #3A8BC5;
    --nucleo-green: #8DC63F;
    --nucleo-green-light: #A5D65E;
    --nucleo-green-dark: #7AB32F;

    /* Neutral Colors */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: var(--gray-50);
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-500);
    --border-color: var(--gray-200);

    /* Error Colors */
    --error-color: #EF4444;
    --error-bg: rgba(239, 68, 68, 0.1);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
                 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

#loginPage {
    display: flex;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Animated Background */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--nucleo-blue) 0%, var(--nucleo-blue-light) 50%, var(--nucleo-green) 100%);
    z-index: 0;
}

.login-background::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 30%, rgba(141, 198, 63, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(74, 159, 216, 0.3) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, 20px) rotate(5deg); }
}

/* Orbital Pattern Overlay */
.orbital-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image:
        radial-gradient(circle at 25% 25%, transparent 30%, var(--gray-900) 30%, var(--gray-900) 31%, transparent 31%),
        radial-gradient(circle at 75% 75%, transparent 30%, var(--gray-900) 30%, var(--gray-900) 31%, transparent 31%);
    background-size: 100px 100px;
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 1400px;
    min-height: 100vh;
    margin: 0 auto;
}

.login-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* ============================================
   BRAND PANEL (LEFT SIDE)
   ============================================ */

.brand-panel {
    background: transparent;
    color: white;
}

.brand-content {
    max-width: 500px;
}

.brand-logo-container {
    margin-bottom: 2.5rem;
    text-align: center;
}

.brand-logo {
    width: 140px;
    height: 140px;
    margin: 0 auto 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    padding: 12px;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-logo::before,
.brand-logo::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

.brand-logo::before {
    width: 160px;
    height: 160px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation-delay: 0s;
}

.brand-logo::after {
    width: 180px;
    height: 180px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation-delay: 1s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0; }
}

.brand-title {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 2.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.brand-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 3rem;
    font-weight: 500;
}

/* Feature List */
.features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: var(--transition);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

.feature-item i {
    font-size: 24px;
    color: white;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--nucleo-green), var(--nucleo-green-light));
    border-radius: 10px;
    flex-shrink: 0;
}

.feature-item span {
    font-size: 1rem;
    color: white;
    font-weight: 500;
    line-height: 1.5;
}

/* ============================================
   FORM PANEL (RIGHT SIDE)
   ============================================ */

.form-panel {
    background: var(--bg-primary);
}

.form-container {
    width: 100%;
    max-width: 440px;
}

.mobile-logo {
    display: none;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(74, 159, 216, 0.2);
    overflow: hidden;
    padding: 8px;
}

.mobile-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.form-container h2 {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.form-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    text-align: center;
}

/* ============================================
   FORM
   ============================================ */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--text-tertiary);
    font-size: 16px;
}

.input-wrapper input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}

.input-wrapper input:focus {
    border-color: var(--nucleo-blue);
    box-shadow: 0 0 0 3px rgba(74, 159, 216, 0.1);
}

.input-wrapper input::placeholder {
    color: var(--text-tertiary);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--nucleo-blue);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-label input {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--nucleo-blue);
}

.link {
    color: var(--nucleo-blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.link:hover {
    color: var(--nucleo-blue-dark);
}

.submit-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--nucleo-blue), var(--nucleo-blue-light));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: var(--transition);
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(74, 159, 216, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--nucleo-blue-dark), var(--nucleo-blue));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 159, 216, 0.4);
}

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

.submit-btn:disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   MICROSOFT SSO BUTTON
   ============================================ */

.microsoft-sso-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
}

.microsoft-sso-btn:hover {
    border-color: var(--nucleo-blue);
    background: var(--gray-50);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 159, 216, 0.15);
}

/* ============================================
   ERROR MESSAGE
   ============================================ */

.error-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--error-bg);
    border: 1px solid var(--error-color);
    border-radius: 10px;
    color: var(--error-color);
    font-size: 14px;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-message i {
    font-size: 18px;
}

/* ============================================
   FORM FOOTER
   ============================================ */

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.form-footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

.terms {
    margin-top: 2rem;
    text-align: center;
}

.terms p {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.terms a {
    color: var(--text-secondary);
}

/* ============================================
   MODAL
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 20px;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 20px;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* ============================================
   UTILITIES
   ============================================ */

.hidden {
    display: none !important;
}

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

@media (max-width: 1024px) {
    .brand-panel {
        display: none;
    }

    .mobile-logo {
        display: flex;
    }

    .login-container {
        min-height: 100vh;
    }
}

@media (max-width: 640px) {
    .login-panel {
        padding: 1.5rem;
    }

    .form-container {
        max-width: 100%;
    }

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

    .brand-title {
        font-size: 2rem;
    }
}
