/**
 * DS Calculator - Auth Styles
 * Pfad: /assets/css/auth.css
 * Version: 1.0.0
 */

/* ===========================
   Auth Page Layout
   =========================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 480px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

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

/* ===========================
   Auth Header
   =========================== */
.auth-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header h2 {
    font-size: 1.5rem;
    color: var(--gray-800);
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--gray-600);
    margin: 0;
}

/* ===========================
   Auth Form
   =========================== */
.auth-form {
    padding: 30px;
}

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

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gray-700);
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(245, 101, 101, 0.1);
}

select.form-control {
    cursor: pointer;
    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='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.form-text {
    display: block;
    margin-top: 5px;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ===========================
   Radio & Checkbox
   =========================== */
.radio-group {
    display: flex;
    gap: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    transition: all 0.3s ease;
    flex: 1;
}

.radio-label:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 500;
}

.radio-label:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.form-check {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.form-check-label {
    cursor: pointer;
    color: var(--gray-700);
    line-height: 1.5;
}

.form-check-label a {
    color: var(--primary-color);
    text-decoration: underline;
}

.form-check-label a:hover {
    color: var(--primary-dark);
}

/* ===========================
   Submit Button
   =========================== */
.btn-block {
    width: 100%;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 20px;
}

.btn-primary.btn-block {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary.btn-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

/* ===========================
   Auth Footer
   =========================== */
.auth-footer {
    padding: 20px 30px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.auth-footer p {
    margin: 0;
    color: var(--gray-600);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ===========================
   Alerts in Auth
   =========================== */
.auth-card .alert {
    margin: 0 30px 20px;
    padding: 15px 20px;
    border-radius: 10px;
    animation: slideDown 0.3s ease;
}

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

/* ===========================
   Loading State
   =========================== */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* ===========================
   Responsive
   =========================== */
@media (max-width: 480px) {
    .auth-container {
        max-width: 100%;
    }
    
    .auth-card {
        border-radius: 0;
    }
    
    .auth-header {
        padding: 30px 20px 20px;
    }
    
    .auth-form {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .radio-group {
        flex-direction: column;
    }
}