/* Login Page Styles - Danish Localization - Modern Dark Design */

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.4) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><defs><linearGradient id="sky" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:%230f3460;stop-opacity:1" /><stop offset="100%" style="stop-color:%231a1a2e;stop-opacity:1" /></linearGradient></defs><rect width="1200" height="400" fill="url(%23sky)"/><polygon points="0,300 100,250 200,280 300,200 400,220 500,180 600,200 700,150 800,170 900,120 1000,140 1100,100 1200,120 1200,400 0,400" fill="%2316213e" opacity="0.8"/><polygon points="0,350 150,320 300,340 450,300 600,320 750,280 900,300 1050,260 1200,280 1200,400 0,400" fill="%230f3460" opacity="0.6"/><circle cx="200" cy="80" r="40" fill="%23ffd700" opacity="0.1"/><circle cx="800" cy="60" r="30" fill="%23ffffff" opacity="0.05"/><circle cx="1000" cy="100" r="20" fill="%23ffd700" opacity="0.08"/></svg>');
    background-size: cover;
    background-position: center bottom;
    pointer-events: none;
    z-index: -1;
}

.login-header {
    text-align: center;
    margin-bottom: 60px;
    color: white;
    position: relative;
    z-index: 1;
}

.login-header .logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
}

.login-header .logo::before {
    content: 'MDT';
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.login-header h1 {
    font-size: 2.8rem;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 600;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #b0b0b0;
}

.department-selection {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 1000px;
    width: 100%;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.department-selection h2 {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.department-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 0;
}

.department-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    user-select: none;
}

.department-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.department-card:hover::before {
    opacity: 1;
}

.department-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.department-card .icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.department-card[data-department="police"] {
    border-color: rgba(59, 130, 246, 0.3);
}

.department-card[data-department="police"] .icon-container {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.department-card[data-department="police"] .icon-container i {
    color: white;
    font-size: 2rem;
}

.department-card[data-department="medical"] {
    border-color: rgba(239, 68, 68, 0.3);
}

.department-card[data-department="medical"] .icon-container {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.department-card[data-department="medical"] .icon-container i {
    color: white;
    font-size: 2rem;
}

.department-card[data-department="lawyer"] {
    border-color: rgba(139, 92, 246, 0.3);
}

.department-card[data-department="lawyer"] .icon-container {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.department-card[data-department="lawyer"] .icon-container i {
    color: white;
    font-size: 2rem;
}

.department-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.department-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.5;
    margin-bottom: 25px;
}

.department-card .access-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.department-card:hover .access-button {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.department-card.selected {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.department-card.selected::after {
    content: '✓';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: rgba(34, 197, 94, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.login-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.login-form .form-group {
    margin-bottom: 30px;
}

.login-form .form-group label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    display: block;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.login-form .form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.login-form .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.login-form .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

.login-form .btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
    border-radius: 12px;
    border: none;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.login-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.login-form .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.login-form .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Animation for form transitions */
.login-form {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.department-selection.fade-out {
    animation: fadeOut 0.4s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}

/* Error Messages */
.error-message {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    animation: slideInDown 0.3s ease-out;
}

.error-message i {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Success Messages */
.success-message {
    background: linear-gradient(135deg, #51cf66, #40c057);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(81, 207, 102, 0.3);
    animation: slideInDown 0.3s ease-out;
}

.success-message i {
    font-size: 1.2rem;
    opacity: 0.9;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }
    
    .login-header h1 {
        font-size: 2.2rem;
    }
    
    .login-header p {
        font-size: 0.9rem;
    }
    
    .department-selection,
    .login-form {
        padding: 40px 30px;
        border-radius: 16px;
    }
    
    .department-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .department-card {
        padding: 35px 25px;
    }
    
    .department-card i {
        font-size: 2.2rem;
    }
    
    .department-card h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }
    
    .login-header h1 {
        font-size: 1.8rem;
    }
    
    .login-header p {
        font-size: 0.8rem;
    }
    
    .department-selection,
    .login-form {
        padding: 30px 20px;
        border-radius: 12px;
    }
    
    .department-selection h2,
    .login-form h2 {
        font-size: 1.4rem;
    }
    
    .department-card {
        padding: 30px 20px;
    }
    
    .department-card i {
        font-size: 2rem;
    }
    
    .department-card h3 {
        font-size: 1.1rem;
    }
    
    .department-card p {
        font-size: 0.8rem;
    }
    
    .login-form .form-group input {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .login-form .btn {
        padding: 14px;
        font-size: 15px;
    }
}
