/**
 * Auth Pages CSS - Login & Register
 * daten24.io
 */

/* ==========================================
   AUTH PAGE LAYOUT
   ========================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--d24-bg-primary), var(--d24-bg-secondary));
    padding: 2rem 0;
}

.auth-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--d24-bg-secondary);
    border-radius: var(--d24-radius-lg);
    overflow: hidden;
    box-shadow: var(--d24-shadow-xl);
}

/* ==========================================
   AUTH VISUAL SIDE
   ========================================== */

.auth-visual {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(108, 92, 231, 0.1));
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.auth-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 212, 170, 0.15), transparent 60%);
    pointer-events: none;
}

.visual-content {
    position: relative;
    z-index: 1;
}

.visual-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--d24-text-primary);
}

.visual-content > p {
    font-size: 1.125rem;
    color: var(--d24-text-secondary);
    margin-bottom: 2rem;
}

.visual-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.visual-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--d24-radius-md);
    backdrop-filter: blur(10px);
}

.visual-feature .icon {
    font-size: 1.5rem;
}

.visual-feature .text {
    font-weight: 500;
    color: var(--d24-text-primary);
}

.visual-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(0, 212, 170, 0.1);
    border-radius: var(--d24-radius-md);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--d24-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--d24-text-secondary);
}

/* Registration Steps */
.registration-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--d24-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: var(--d24-transition);
}

.step.active .step-number {
    background: var(--d24-primary);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: var(--d24-text-muted);
}

.step.active .step-label {
    color: var(--d24-text-primary);
}

.step-connector {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 0.5rem;
}

.visual-benefits h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.visual-benefits ul {
    list-style: none;
    padding: 0;
}

.visual-benefits li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--d24-text-secondary);
}

.visual-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--d24-primary);
    font-weight: 700;
}

/* ==========================================
   AUTH FORM SIDE
   ========================================== */

.auth-form-wrapper {
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-form-content {
    width: 100%;
    max-width: 400px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    max-height: 60px;
}

.auth-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--d24-text-secondary);
    margin-bottom: 2rem;
}

/* Auth Messages */
.auth-error,
.auth-success {
    padding: 1rem;
    border-radius: var(--d24-radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.auth-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

/* Auth Form */
.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--d24-text-primary);
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.form-link {
    font-size: 0.875rem;
    color: var(--d24-primary);
    text-decoration: none;
}

.form-link:hover {
    text-decoration: underline;
}

.auth-form .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--d24-bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--d24-radius-md);
    color: var(--d24-text-primary);
    font-size: 1rem;
    transition: var(--d24-transition);
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--d24-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--d24-text-muted);
}

.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.password-strength .strength-bar {
    height: 100%;
    transition: var(--d24-transition);
}

.password-strength.weak .strength-bar {
    width: 33%;
    background: #ef4444;
}

.password-strength.medium .strength-bar {
    width: 66%;
    background: #f59e0b;
}

.password-strength.strong .strength-bar {
    width: 100%;
    background: #22c55e;
}

/* Checkbox */
.form-checkbox {
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
}

.checkbox-label span {
    flex: 1;
    font-size: 0.875rem;
    color: var(--d24-text-secondary);
}

.checkbox-label a {
    color: var(--d24-primary);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-block {
    width: 100%;
}

.btn-loading {
    position: relative;
}

.btn-loading.loading .btn-text {
    opacity: 0;
}

.btn-loading.loading .btn-spinner {
    display: flex !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer p {
    color: var(--d24-text-secondary);
    font-size: 0.875rem;
}

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

.auth-link:hover {
    text-decoration: underline;
}

/* ==========================================
   REGISTRATION SPECIFIC
   ========================================== */

.registration-step-content {
    display: none;
}

.registration-step-content.active {
    display: block;
}

/* Role Selection */
.role-selection {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.role-card {
    position: relative;
    cursor: pointer;
}

.role-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.role-card-content {
    padding: 2rem;
    background: var(--d24-bg-primary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--d24-radius-lg);
    transition: var(--d24-transition);
}

.role-card:hover .role-card-content {
    border-color: rgba(0, 212, 170, 0.3);
    transform: translateY(-2px);
}

.role-card input[type="radio"]:checked + .role-card-content {
    border-color: var(--d24-primary);
    background: rgba(0, 212, 170, 0.05);
}

.role-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.role-card h3 {
    margin-bottom: 0.5rem;
}

.role-card > .role-card-content > p {
    color: var(--d24-text-secondary);
    margin-bottom: 1rem;
}

.role-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.role-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.875rem;
    color: var(--d24-text-secondary);
}

.role-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--d24-primary);
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--d24-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1rem;
}

.role-badge.recommended {
    background: var(--d24-primary);
    color: white;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-navigation .btn {
    flex: 1;
}

/* Registration Summary */
.registration-summary {
    background: var(--d24-bg-primary);
    padding: 1.5rem;
    border-radius: var(--d24-radius-md);
    margin-bottom: 2rem;
}

.registration-summary h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item .label {
    color: var(--d24-text-secondary);
    font-size: 0.875rem;
}

.summary-item .value {
    color: var(--d24-text-primary);
    font-weight: 500;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        padding: 2rem;
    }

    .visual-content h2 {
        font-size: 1.5rem;
    }

    .registration-steps {
        justify-content: center;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .auth-page {
        padding: 1rem 0;
    }

    .auth-visual {
        display: none;
    }

    .auth-form-wrapper {
        padding: 2rem 1rem;
    }

    .auth-wrapper {
        box-shadow: none;
        background: transparent;
    }

    .role-selection {
        gap: 1rem;
    }

    .role-card-content {
        padding: 1.5rem;
    }

    .form-navigation {
        flex-direction: column-reverse;
    }
}
