/* ===================================
   Login Page CSS - Application.Fleet.Invoices
   Premium Corporate Minimal Design
   =================================== */

/* ===================================
   CSS Variables & Reset
   =================================== */
:root {
    /* Premium Corporate Palette */
    --bg-primary: #0a0f1e;
    --bg-secondary: #111827;
    --card-bg: #1a1f2e;
    --primary-color: #3b82f6;
    --primary-hover: #60a5fa;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.1);
    --border-focus: rgba(59, 130, 246, 0.3);
    --error-color: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --success-color: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);

    /* Premium Shadows */
    --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-card: 0 4px 20px 0 rgba(0, 0, 0, 0.4);
}

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

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   Main Login Container
   =================================== */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3.5rem;
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 400px;
}

/* ===================================
   Header with Logo and Title
   =================================== */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.logo-icon {
    width: 56px;
    height: 56px;
    opacity: 0.9;
}

.app-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.subtitle {
    font-size: 0.813rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.625rem;
    letter-spacing: 0.01em;
}

/* ===================================
   Login Form
   =================================== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

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

.form-group label {
    font-size: 0.813rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.input-container {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.938rem;
    font-weight: 400;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

.form-group input:focus {
    outline: none;
    border-color: var(--border-focus);
    background: rgba(17, 24, 39, 0.8);
}

.form-group input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.toggle-password:hover {
    opacity: 1;
    background: rgba(59, 130, 246, 0.1);
}

.eye-icon {
    font-size: 1.125rem;
    line-height: 1;
}

/* Login Button */
.login-btn {
    padding: 0.938rem 1.5rem;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.938rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0.5rem;
    letter-spacing: 0.01em;
}

.login-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

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

.login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===================================
   Status Messages
   =================================== */
.status-messages {
    margin-top: 1.25rem;
    min-height: 1rem;
}

.error-message,
.success-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.813rem;
    font-weight: 400;
    border: 1px solid transparent;
}

.error-message {
    background: var(--error-bg);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.success-message {
    background: var(--success-bg);
    border-color: rgba(16, 185, 129, 0.2);
    color: #86efac;
}

.error-icon,
.success-icon {
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.9;
}

/* ===================================
   Footer
   =================================== */
.app-footer {
    padding: 2rem;
    text-align: center;
}

.footer-signature {
    font-size: 0.688rem;
    font-weight: 400;
    color: rgba(148, 163, 184, 0.4);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===================================
   Loading States
   =================================== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ===================================
   Shake Animation
   =================================== */
.shake {
    animation: shake 0.3s ease;
}

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

/* ===================================
   Responsive Design - Tablet (768px and below)
   =================================== */
@media (max-width: 768px) {
    .login-container {
        padding: 1.5rem;
        min-height: 100vh;
    }

    .login-card {
        padding: 2.5rem 2rem;
        max-width: 100%;
    }

    .app-title {
        font-size: 1.25rem;
    }

    .logo-icon {
        width: 48px;
        height: 48px;
    }

    .form-group input {
        min-height: 44px;
        font-size: 16px;
    }

    .login-btn {
        min-height: 44px;
    }
}

/* ===================================
   Responsive Design - Mobile (480px and below)
   =================================== */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
        min-height: 100vh;
        justify-content: center;
    }

    .login-card {
        padding: 2rem 1.5rem;
        width: 100%;
        max-width: 100%;
        box-shadow: var(--shadow-subtle);
    }

    .app-title {
        font-size: 1.125rem;
        line-height: 1.3;
    }

    .subtitle {
        font-size: 0.75rem;
    }

    .logo-icon {
        width: 44px;
        height: 44px;
    }

    .form-group {
        gap: 0.5rem;
        margin-bottom: 1.25rem;
    }

    .form-group label {
        font-size: 0.75rem;
    }

    .form-group input {
        padding: 0.75rem 2.5rem 0.75rem 0.875rem;
        font-size: 1rem;
        min-height: 44px;
        border-radius: 6px;
    }

    .toggle-password {
        right: 0.5rem;
        padding: 0.375rem;
    }

    .eye-icon {
        font-size: 1rem;
    }

    .login-btn {
        padding: 0.75rem 1.125rem;
        font-size: 0.875rem;
        min-height: 44px;
        width: 100%;
    }

    .login-form {
        gap: 1.5rem;
    }

    .status-messages {
        margin-top: 1rem;
    }

    .error-message,
    .success-message {
        padding: 0.75rem 0.875rem;
        font-size: 0.75rem;
        gap: 0.625rem;
    }

    .error-icon,
    .success-icon {
        font-size: 0.875rem;
    }

    .app-footer {
        padding: 1.5rem 1rem;
    }

    .footer-signature {
        font-size: 0.625rem;
    }
}

/* ===================================
   Touch-Friendly Targets (Pointer: Coarse)
   =================================== */
@media (pointer: coarse) {
    .login-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .form-group input {
        min-height: 44px;
        font-size: 16px;
        padding: 0.875rem 3rem 0.875rem 1rem;
    }

    .toggle-password {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    button:active:not(:disabled) {
        transform: scale(0.98);
    }
}

/* ===================================
   Landscape Mobile
   =================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .login-container {
        padding: 1rem;
    }

    .login-card {
        padding: 1.5rem 2rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .logo-container {
        gap: 0.75rem;
        flex-direction: row;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .app-title {
        font-size: 1rem;
    }

    .login-form {
        gap: 1rem;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.hidden {
    display: none !important;
}
