/* Portal Page Styles */

/* Page Hero */
.page-hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 120px 0 80px;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-pattern {
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

.security-elements .security-1,
.security-elements .security-2,
.security-elements .security-3 {
    opacity: 0.6;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
}

.hero-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

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

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.page-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    line-height: 1.6;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.security-badge:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.security-badge i {
    font-size: 1rem;
    color: var(--accent-color);
}

.security-badge span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Portal Login Section */
.portal-login-section {
    padding: 100px 0;
    background: var(--bg-color);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.login-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.login-tile {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
}

.login-tile:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.login-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.login-tile:hover::before {
    transform: scaleX(1);
}

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

.tile-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.login-tile:hover .tile-icon {
    transform: scale(1.1) rotate(5deg);
}

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

.tile-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.tile-content {
    margin-bottom: 2rem;
}

.tile-content p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.feature-list li i {
    color: var(--success-color);
    font-size: 0.8rem;
    width: 16px;
}

.tile-footer {
    text-align: center;
}

.login-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn i {
    margin-right: 0.5rem;
}

.tile-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    pointer-events: none;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0.1;
}

.circle-1 {
    width: 60px;
    height: 60px;
    top: -30px;
    right: -30px;
    animation: pulse 2s ease-in-out infinite;
}

.circle-2 {
    width: 40px;
    height: 40px;
    top: -20px;
    right: -20px;
    animation: pulse 2s ease-in-out infinite 0.5s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.1; }
    50% { transform: scale(1.2); opacity: 0.2; }
}

/* Role-specific styling */
.employee-tile:hover {
    border-color: var(--primary-color);
}

.customer-tile:hover {
    border-color: var(--secondary-color);
}

.consignee-tile:hover {
    border-color: var(--accent-color);
}

/* Security Info Section */
.security-info {
    padding: 80px 0;
    background: var(--surface-color);
}

.info-box {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--info-color), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon i {
    font-size: 1.5rem;
    color: white;
}

.info-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.info-content p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.security-features {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.security-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.security-feature i {
    color: var(--success-color);
    font-size: 1rem;
}

/* Help Section */
.help-section {
    padding: 100px 0;
    background: var(--bg-color);
}

.help-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 3rem;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.help-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.help-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.help-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.help-icon i {
    font-size: 1.5rem;
    color: white;
}

.help-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.help-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.help-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.help-link:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

/* Login Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy);
    transform: scale(0.8) translateY(50px);
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

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

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--surface-color);
    color: var(--text-color);
}

.modal-body {
    padding: 2rem;
}

.redirect-info {
    text-align: center;
    margin-bottom: 2rem;
}

.redirect-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success-color), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

.redirect-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.redirect-url {
    background: var(--surface-color);
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-color);
    word-break: break-all;
    border: 1px solid var(--border-color);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-actions .btn {
    padding: 0.75rem 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-hero {
        padding: 100px 0 60px;
        min-height: 50vh;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .security-badges {
        gap: 1rem;
    }
    
    .security-badge {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .portal-login-section {
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .login-tiles {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .login-tile {
        padding: 2rem;
    }
    
    .info-box {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }
    
    .security-features {
        justify-content: center;
    }
    
    .help-section {
        padding: 60px 0;
    }
    
    .help-section h2 {
        font-size: 2rem;
    }
    
    .help-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .hero-icon {
        width: 60px;
        height: 60px;
    }
    
    .hero-icon i {
        font-size: 1.5rem;
    }
    
    .tile-icon {
        width: 60px;
        height: 60px;
    }
    
    .tile-icon i {
        font-size: 1.5rem;
    }
    
    .login-tile {
        padding: 1.5rem;
    }
    
    .info-box {
        padding: 1.5rem;
    }
    
    .help-card {
        padding: 1.5rem;
    }
}

/* Dark Mode Adjustments */
body.dark .login-tile {
    background: var(--card-bg-dark);
    border-color: var(--border-color-dark);
}

body.dark .info-box {
    background: var(--card-bg-dark);
    border-color: var(--border-color-dark);
}

body.dark .help-card {
    background: var(--card-bg-dark);
    border-color: var(--border-color-dark);
}

body.dark .modal-content {
    background: var(--card-bg-dark);
}

body.dark .redirect-url {
    background: var(--surface-color-dark);
    border-color: var(--border-color-dark);
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in.delay-1 { animation-delay: 0.1s; }
.fade-in.delay-2 { animation-delay: 0.2s; }
.fade-in.delay-3 { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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