/* 
    ProjecTrac Login Page - Modern CSS (Simplified)
    Updated: December 2025
    Description: Clean, modern login page matching LightWave client website aesthetic
    Website: www.lwtelecom.com
*/

/* ========================================
   CSS RESET & BASE STYLES
   ======================================== */

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

:root {
    /* Brand Colors - Matching lwtelecom.com */
    --primary-blue: #0c2486;
    --primary-dark: #071854;
    --accent-blue: #2563eb;
    
    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   BODY & LAYOUT
   ======================================== */

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-900);
    background: linear-gradient(135deg, #0c2486 0%, #071854 50%, #0a1d5c 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    position: relative;
}

/* Animated background pattern */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

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

.login-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
    padding: var(--spacing-2xl);
    position: relative;
    z-index: 1;
    animation: slideUp 0.5s ease-out;
}

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

/* ========================================
   LOGO SECTION
   ======================================== */

.logo-section {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.logo-section svg {
        max-width: 280px;
            width: 100%;
                height: auto;
                    margin-bottom: var(--spacing-lg);
                        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-section img {
    max-width: 200px;
    height: auto;
    margin-bottom: var(--spacing-lg);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

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

h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
    text-align: center;
    letter-spacing: -0.025em;
}

p {
    font-size: 1rem;
    color: var(--gray-600);
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

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

form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    letter-spacing: 0.025em;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gray-900);
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    font-family: var(--font-sans);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: var(--gray-50);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="email"]::placeholder {
    color: var(--gray-400);
}

/* Username field with @lwtelecom.com */
.username-wrapper {
    position: relative;
}

.username-wrapper input {
    padding-right: 140px;
}

.username-domain {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-600);
    font-size: 0.875rem;
    pointer-events: none;
}

/* ========================================
   BUTTONS
   ======================================== */

button[type="submit"],
input[type="submit"],
.btn-primary {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--white);
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary-blue) 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

button[type="submit"]:hover,
input[type="submit"]:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

button[type="submit"]:active,
input[type="submit"]:active,
.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

button[type="submit"]:disabled,
input[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   ERROR/SUCCESS MESSAGES
   ======================================== */

.message {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.message.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ========================================
   LOADING STATE
   ======================================== */

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   RESPONSIVE DESIGN - TABLET
   ======================================== */

@media (max-width: 768px) {
    body {
        padding: var(--spacing-md);
    }
    
    .login-container {
        padding: var(--spacing-xl);
        max-width: 100%;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .logo-section img {
        max-width: 160px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE
   ======================================== */

@media (max-width: 480px) {
    body {
        padding: var(--spacing-sm);
    }
    
    .login-container {
        padding: var(--spacing-lg);
        border-radius: var(--radius-lg);
    }
    
    h1 {
        font-size: 1.375rem;
    }
    
    p {
        font-size: 0.875rem;
    }
    
    .logo-section img {
        max-width: 140px;
        margin-bottom: var(--spacing-md);
    }
    
    input[type="text"],
    input[type="password"],
    input[type="email"] {
        padding: 0.75rem 0.875rem;
        font-size: 0.9375rem;
    }
    
    .username-wrapper input {
        padding-right: 130px;
    }
    
    .username-domain {
        font-size: 0.8125rem;
    }
    
    button[type="submit"],
    input[type="submit"],
    .btn-primary {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    form {
        gap: var(--spacing-md);
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Reduced motion for users with vestibular disorders */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-container {
        border: 2px solid var(--gray-900);
    }
    
    input[type="text"],
    input[type="password"],
    input[type="email"] {
        border-width: 2px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    body {
        background: white;
    }
    
    .login-container {
        box-shadow: none;
    }
    
    button[type="submit"],
    input[type="submit"] {
        display: none;
    }
}

/* ========================================
   ALTERNATIVE LAYOUT - CENTERED
   ======================================== */

/* If you want the form completely centered on large screens */
@media (min-width: 1024px) {
    .login-container {
        max-width: 480px;
    }
}

/* ========================================
   CUSTOM SCROLLBAR (for any overflow)
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}
@media (max-height: 500px) and (orientation: landscape) {
    body {
        display: block;
        padding: 1rem 0.5rem;
        min-height: auto;
    }
    
    .login-container {
        margin: 1rem auto;
        max-width: 500px;
    }
    
    .logo-section {
        margin-bottom: 0.75rem;
    }
    
    .logo-section img {
        max-width: 180px;
        margin-bottom: 0.5rem;
    }
    
    h1 {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    p {
        font-size: 0.8125rem;
        margin-bottom: 0.75rem;
    }
    
    form {
        gap: 0.75rem;
    }
    
    .form-group {
        gap: 0.25rem;
    }
    
    input[type="text"],
    input[type="password"],
    input[type="email"] {
        padding: 0.625rem 0.75rem;
    }
    
    button[type="submit"],
    input[type="submit"] {
        padding: 0.75rem 1rem;
    }
}
