/* Authentication Layout Styles */
/* Login ve Register sayfaları için ayrı CSS dosyası */

/* Koyu mod engelleme - Google otomatik koyu modunu devre dışı bırak */
html {
    color-scheme: light only;
}

/* Authentication sayfaları için body stilleri */
.auth-body {
    background: #1A1A2E url('/images/login-bg.png') center center/cover no-repeat;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}

.auth-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.auth-body > * {
    position: relative;
    z-index: 2;
}

/* Auth container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Auth card */
.auth-card {
    background: #1E1E2D;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    width: 100%;
    max-width: 600px;
    animation: slideUp 0.6s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Auth header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: #ffffff;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* Auth brand */
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    text-decoration: none;
    color: #4f46e5;
}

.auth-brand-icon {
    width: 48px;
    height: 48px;
    background: #4f46e5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 12px;
    font-size: 1.5rem;
}

.auth-brand-text {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Form stilleri */
.auth-form {
    width: 100%;
}

.auth-form-group {
    margin-bottom: 1.5rem;
}

.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-form-row .auth-form-group {
    margin-bottom: 0;
}

.auth-form-label {
    display: block;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.auth-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.auth-form-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.auth-form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Şifre alanı için wrapper ve göz ikonu stilleri */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper .auth-form-input {
    padding-right: 2.5rem; /* Göz ikonu için sağda boşluk */
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    transition: color 0.2s ease;
    z-index: 10;
    user-select: none;
}

.password-toggle:hover {
    color: rgba(255, 255, 255, 0.9);
}

.password-toggle:active {
    color: #667eea;
}

/* Checkbox stilleri */
.auth-checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-checkbox {
    accent-color: #667eea;
}

.auth-checkbox-label {
    font-size: 0.875rem;
    color: #ffffff;
    cursor: pointer;
}

.auth-checkbox-label a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-checkbox-label a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Button stilleri */
.auth-btn {
    width: 100%;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Auth footer */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-forgot-link {
    color: #ffffff;
    text-decoration: underline;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.auth-forgot-link:hover {
    color: #667eea;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-separator {
    margin-top: 1rem;
    position: relative;
}

.auth-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.auth-separator span {
    background: #1E1E2D;
    color: rgba(255, 255, 255, 0.7);
    padding: 0 1rem;
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

.auth-footer p {
    color: #ffffff;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Validation error stilleri */
.auth-validation-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.auth-form-input.is-invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.auth-form-input.is-invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Success message */
.auth-alert-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

/* Error message */
.auth-alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

/* Loading state */
.auth-btn.loading {
    pointer-events: none;
}

.auth-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 white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Dropdown menu for tenant selection */
.auth-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.auth-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Animasyonlar */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .auth-container {
        /* Alttan boşluk ekle */
        padding-bottom: 2rem;
    }
    
    .auth-card {
        padding: 2rem;
        margin: 1rem;
        border-radius: 12px;
        /* Telefon modunda sadece form alanını aşağı kaydır */
        margin-top: 70px;
    }
    
    /* Alt bilgi mobilde daha küçük */
    .auth-container .text-center small {
        font-size: 0.75rem;
        line-height: 1.6;
    }

    .auth-header h2 {
        font-size: 1.75rem;
    }

    .auth-brand-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .auth-brand-text {
        font-size: 1.25rem;
    }

    .auth-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-form-row .auth-form-group {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1rem 0.5rem;
    }

    .auth-card {
        padding: 1.5rem;
        /* Küçük ekranlarda daha az boşluk */
        margin-top: 60px;
    }

    .auth-header h2 {
        font-size: 1.5rem;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .auth-card {
        border: 2px solid #000;
    }
    
    .auth-form-input {
        border: 2px solid #000;
    }
    
    .auth-btn {
        border: 2px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .auth-card {
        animation: none;
    }
    
    .auth-btn,
    .auth-form-input {
        transition: none;
    }
}

/* Şifre sıfırlama sayfaları için ek stiller */
.auth-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Şifre input grubu - toggle butonu için */
.auth-password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-password-input-group .auth-form-input {
    padding-right: 3rem; /* Toggle butonu için yer aç */
}

.auth-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 10;
}

.auth-password-toggle:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

.auth-password-toggle:focus {
    outline: none;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* Modern Toast Bildirimleri */
.auth-toast {
    background: #1E1E2D;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    color: #ffffff;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.5s ease-out;
}

.auth-toast .toast-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px 12px 0 0;
    color: #ffffff;
    font-weight: 600;
}

.auth-toast .toast-body {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Toast türleri */
.auth-toast-success {
    border-left: 4px solid #10b981;
}

.auth-toast-success .toast-header {
    border-left: 4px solid #10b981;
}

.auth-toast-error {
    border-left: 4px solid #ef4444;
}

.auth-toast-error .toast-header {
    border-left: 4px solid #ef4444;
}

.auth-toast-info {
    border-left: 4px solid #3b82f6;
}

.auth-toast-info .toast-header {
    border-left: 4px solid #3b82f6;
}

/* Toast kapatma butonu */
.auth-toast .btn-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    padding: 0.25rem;
    transition: all 0.2s ease;
}

.auth-toast .btn-close:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.auth-toast .btn-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

/* Toast animasyonları */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Toast container */
.toast-container {
    pointer-events: none;
}

.toast-container .toast {
    pointer-events: auto;
}

/* Responsive toast */
@media (max-width: 768px) {
    .auth-toast {
        min-width: 280px;
        max-width: 320px;
        margin-bottom: 0.5rem;
    }
    
    .toast-container {
        top: 1rem !important;
        right: 1rem !important;
        left: 1rem !important;
        padding: 0 !important;
    }
}

@media (max-width: 480px) {
    .auth-toast {
        min-width: 260px;
        max-width: 300px;
    }
}

/* Auth Modal Stilleri - Ana panel temasına uyumlu */
.auth-modal {
    background: #1E1E2D;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    color: #ffffff;
}

.auth-modal-header {
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px 16px 0 0;
    color: #ffffff;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.auth-modal-body {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.5;
    padding: 1.5rem;
}

.auth-modal-footer {
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 16px 16px;
    padding: 1rem 1.5rem;
}

/* Modal türleri */
.auth-modal-success .auth-modal-header {
    border-left: 4px solid #10b981;
    color: #10b981;
}

.auth-modal-success .auth-modal-header i {
    color: #10b981;
}

.auth-modal-error .auth-modal-header {
    border-left: 4px solid #ef4444;
    color: #ef4444;
}

.auth-modal-error .auth-modal-header i {
    color: #ef4444;
}

.auth-modal-info .auth-modal-header {
    border-left: 4px solid #3b82f6;
    color: #3b82f6;
}

.auth-modal-info .auth-modal-header i {
    color: #3b82f6;
}

/* Modal butonları */
.auth-modal .btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.auth-modal .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.auth-modal .btn-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.auth-modal .btn-close:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
}

.auth-modal .btn-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

/* Modal backdrop */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

/* Responsive modal */
@media (max-width: 768px) {
    .auth-modal {
        margin: 1rem;
        border-radius: 12px;
    }
    
    .auth-modal-header,
    .auth-modal-body,
    .auth-modal-footer {
        padding: 1rem;
    }
}

/* Print stilleri */
@media print {
    .auth-body {
        background: white;
    }
    
    .auth-card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .modal {
        display: none !important;
    }
}

/* SMS Code Input Styles */
.sms-code-container {
    margin: 20px 0;
}

.sms-digit-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.sms-digit {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
    outline: none;
}

.sms-digit:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: scale(1.05);
}

.sms-digit.filled {
    border-color: #28a745;
    background-color: #f8f9fa;
}

.sms-digit.error {
    border-color: #dc3545;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Mobile responsive */
@media (max-width: 576px) {
    .sms-digit {
        width: 45px;
        height: 45px;
        font-size: 20px;
        gap: 8px;
    }
    
    .sms-digit-inputs {
        gap: 8px;
    }
}