/**
 * PM Portal - Sleek Login Page
 * After Dark Systems Premium Design
 */

/* Login Page Specific Styles */
.login-page {
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f35 50%, #0f1728 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated Background */
.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.5; }
}

/* Grid Pattern Overlay */
.login-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.login-container {
    display: flex;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.login-box {
    flex: 0 0 450px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.15);
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #3b82f6;
    text-transform: uppercase;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 0.95rem;
    color: #94a3b8;
    font-weight: 400;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease-out;
}

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

.alert::before {
    content: '●';
    font-size: 1.2rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-error::before {
    color: #ef4444;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-success::before {
    color: #10b981;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.alert-info::before {
    color: #3b82f6;
}

/* Form Styles */
.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1.125rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input::placeholder {
    color: #64748b;
}

.form-group input:focus {
    background: rgba(30, 41, 59, 0.8);
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    font-size: 0.875rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #cbd5e1;
}

.checkbox input[type="checkbox"] {
    width: auto;
    cursor: pointer;
    accent-color: #3b82f6;
}

.link-secondary {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.link-secondary:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

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

.btn-secondary {
    background: rgba(51, 65, 85, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #cbd5e1;
}

.btn-secondary:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: #3b82f6;
    color: #f8fafc;
}

.btn-block {
    width: 100%;
}

/* Divider */
.login-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

.login-divider::before,
.login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(59, 130, 246, 0.2), transparent);
}

.login-divider::before {
    left: 0;
}

.login-divider::after {
    right: 0;
}

.login-divider span {
    background: rgba(15, 23, 42, 0.85);
    padding: 0 1rem;
    position: relative;
}

/* SSO Options */
.sso-options {
    margin-bottom: 2rem;
}

.sso-options .icon {
    font-size: 1.25rem;
}

/* Footer */
.login-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

.login-footer p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: #94a3b8;
}

.login-footer a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.small-text {
    font-size: 0.8rem !important;
}

/* Info Panel */
.login-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    animation: slideInRight 0.6s ease-out;
}

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

.login-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 2rem;
    letter-spacing: -1px;
    line-height: 1.2;
}

.features-list {
    list-style: none;
    margin-bottom: 3rem;
}

.features-list li {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.features-list li:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.features-list .icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.features-list strong {
    display: block;
    color: #f8fafc;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.features-list p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Stats */
.login-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
    }

    .login-box {
        flex: 1;
    }

    .login-info {
        display: none;
    }
}

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

    .login-box {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .login-header h1 {
        font-size: 1.75rem;
    }

    .login-stats {
        grid-template-columns: 1fr;
    }
}

/* Loading State */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}
