/**
 * =====================================================
 * ABLUS - LOGIN PAGE STYLES
 * =====================================================
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0f0f0f;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* ===== BACKGROUND ===== */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(229, 9, 20, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(180, 0, 20, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 10%, rgba(255, 50, 70, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 100%);
    z-index: -1;
    animation: backgroundPulse 20s ease-in-out infinite;
}

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

/* ===== CONTAINER ===== */
.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* ===== LOGO ===== */
.login-logo {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease;
}

.login-logo .logo-image {
    max-width: 280px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 12px rgba(229, 9, 20, 0.3));
    transition: transform 0.3s ease;
}

.login-logo .logo-image:hover {
    transform: scale(1.02);
}

.login-logo p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
}

/* ===== LOGIN CARD ===== */
.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease 0.2s both;
}

.login-card h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

/* ===== BACK BUTTON ===== */
.back-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.back-button:hover {
    color: #667eea;
}

/* ===== FORM ===== */
.form-group {
    margin-bottom: 22px;
}

/* Password input wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 50px; /* Gör plats för toggle-knappen */
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 6px;
    z-index: 10;
}

.password-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.eye-icon {
    font-size: 20px;
    line-height: 1;
    user-select: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.password-toggle:hover .eye-icon {
    opacity: 1;
}

/* När lösenordet är synligt */
.password-toggle.active .eye-icon {
    opacity: 1;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: #e50914;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

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

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== FORM OPTIONS ===== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    margin-bottom: 15px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #e50914;
}

.checkbox-label span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Checkbox container för multiple checkboxes */
.checkbox-group {
    margin: 20px 0;
}

.forgot-password,
.link {
    color: #e50914;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover,
.link:hover {
    color: #f40612;
}

/* ===== BUTTONS ===== */
.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, #e50914 0%, #b20710 100%);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(229, 9, 20, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(229, 9, 20, 0.4);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ===== SPINNER ===== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== DIVIDER ===== */
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.login-divider span {
    padding: 0 15px;
}

/* ===== ERROR MESSAGE ===== */
.error-message {
    background: rgba(229, 9, 20, 0.1);
    border: 1px solid rgba(229, 9, 20, 0.3);
    color: #ff6b6b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    animation: shake 0.4s ease;
}

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

/* ===== TEST ACCOUNTS INFO ===== */
.test-accounts-info {
    margin-top: 30px;
    text-align: center;
}

.test-accounts-info details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
}

.test-accounts-info summary {
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    user-select: none;
}

.test-accounts-list {
    margin-top: 15px;
    display: grid;
    gap: 10px;
    text-align: left;
}

.test-account {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.test-account strong {
    color: #e50914;
}

.test-account code {
    display: block;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* ===== NOTIFICATION ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #0f0f0f;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    max-width: 350px;
    font-size: 14px;
    font-weight: 500;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #ffffff;
}

.notification.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #ffffff;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 25px;
    }
    
    .login-logo h1 {
        font-size: 36px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ===== SELECT DROPDOWN STYLING ===== */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

select option {
    background: #1a1a2e;
    color: #ffffff;
}