/* App Portal Specific Styles */
.app-portal-body {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

/* Portal Header */
.portal-header {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.portal-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-logo {
    display: flex;
    align-items: center;
    color: #ff6b35;
    font-size: 1.5rem;
    font-weight: 700;
}

.portal-logo i {
    margin-right: 10px;
    font-size: 2rem;
}

.portal-badge {
    background: #ff6b35;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-left: 1rem;
    font-weight: 600;
}

.back-to-site {
    color: #ccc;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.back-to-site:hover {
    color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
}

/* Main Portal Layout */
.portal-main {
    padding: 2rem 0;
}

.portal-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

/* Login Section */
.login-section {
    position: sticky;
    top: 120px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.login-header h1 {
    color: #1a1a1a;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.input-group i {
    position: absolute;
    left: 1rem;
    color: #666;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.input-group input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #ff6b35;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #666;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    transform: scale(1.2);
}

.forgot-password {
    color: #ff6b35;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #e55a2b;
}

.login-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-btn:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* MFA Section */
.mfa-section {
    animation: fadeIn 0.5s ease;
}

.mfa-header {
    text-align: center;
    margin-bottom: 2rem;
}

.mfa-header i {
    font-size: 3rem;
    color: #ff6b35;
    margin-bottom: 1rem;
}

.mfa-header h3 {
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.mfa-header p {
    color: #666;
}

.mfa-code-input {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.mfa-digit {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
}

.mfa-digit:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.verify-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 1rem;
}

.verify-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.mfa-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.resend-code,
.use-backup {
    background: none;
    border: none;
    color: #ff6b35;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.resend-code:hover,
.use-backup:hover {
    background: rgba(255, 107, 53, 0.1);
}

.register-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.register-section a {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 600;
}

.register-section a:hover {
    color: #e55a2b;
}

/* Features Preview */
.features-preview {
    color: white;
}

.features-preview h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ff6b35;
    text-align: center;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.preview-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.preview-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.preview-icon {
    background: #ff6b35;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.preview-icon i {
    font-size: 2rem;
    color: white;
}

.preview-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.preview-card p {
    color: #ccc;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.preview-card ul {
    list-style: none;
    padding: 0;
}

.preview-card li {
    color: #ddd;
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.preview-card li:before {
    content: "✓";
    color: #ff6b35;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Portal Footer */
.portal-footer {
    background: rgba(26, 26, 26, 0.95);
    border-top: 1px solid #333;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ccc;
}

.footer-left p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.footer-right {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #ff6b35;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading-btn {
    position: relative;
    color: transparent !important;
}

.loading-btn::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .portal-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .login-section {
        position: static;
    }
    
    .preview-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .portal-nav {
        padding: 0 1rem;
    }
    
    .portal-container {
        padding: 0 1rem;
    }
    
    .login-card {
        padding: 2rem;
    }
    
    .features-preview h2 {
        font-size: 2rem;
    }
    
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-right {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .mfa-code-input {
        gap: 0.25rem;
    }
    
    .mfa-digit {
        width: 40px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .portal-logo span:first-of-type {
        display: none;
    }
    
    .portal-badge {
        margin-left: 0.5rem;
        font-size: 0.7rem;
    }
}
