/* ================================================================
   PLANSAL — ORTAK STİLLER
   Tüm sayfalarda kullanılır (navbar, logo, butonlar, modallar, formlar, notif)
   ================================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: radial-gradient(circle at top right, #e0e7ff, #f3f4f6);
    color: #1f2937;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* --- ÜST MENÜ (NAVBAR) --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    color: #1e1b4b;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

.logo-raft {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.1);
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    color: #1e1b4b;
    letter-spacing: -0.5px;
}

.logo-highlight {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    background-clip:text;-webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo i {
    color: #4f46e5;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    padding: 10px;
    border-radius: 12px;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.1);
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- BUTONLAR --- */
.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
}

.btn-outline {
    background-color: rgba(255, 255, 255, 0.6);
    color: #4f46e5;
    border: 2px solid #4f46e5;
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    background-color: #4f46e5;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.btn-danger {
    background-color: transparent;
    color: #ef4444;
    border: 2px solid #ef4444;
}

.btn-danger:hover {
    background-color: #ef4444;
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

.user-greeting {
    font-weight: 700;
    color: #374151;
    margin-right: 10px;
}

/* --- MODAL (GİRİŞ/KAYIT) STİLLERİ --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.35);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    color: #2c3e50;
    font-size: 24px;
}

.close-btn {
    background: #f8f9fa;
    border: none;
    font-family: Arial, sans-serif;
    font-weight: 300;
    font-size: 26px;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px 0 0 0;
}

.close-btn:hover { background: #ffeaea; color: #d9534f; }

/* --- FORM ALANLARI --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: white;
    color: #333;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.modal-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.modal-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    display: none;
}

/* Kayıt modalının yatayda genişleyebilmesi için */
.modal-wide {
    max-width: 650px !important;
}

/* 2 Sütunlu Grid (Izgara) Yapısı */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

/* Telefondan (dar ekrandan) girilirse yan yana sıkışmasın, alt alta geçsin */
@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .modal-wide {
        max-width: 90% !important;
    }
}

/* Hesap Türü İçin İnce / Birleşik Seçim Kutusu */
.role-group-container {
    grid-column: span 2;
}

.compact-role-toggle {
    display: flex;
    background-color: #f4f7f6;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    padding: 4px;
    height: 46px;
    width: 100%;
}

.compact-role-toggle input[type="radio"] {
    display: none;
}

.compact-role-toggle label {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #7f8c8d;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

/* Seçilen öğenin mavi hap şeklini alması */
.compact-role-toggle input[type="radio"]:checked + label {
    background-color: #3498db;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Dinamik form alanlarını gizlemek için */
.hidden-field {
    display: none !important;
}

/* --- ÖZEL AÇILIR MENÜ (CUSTOM SELECT) TASARIMI --- */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    background-color: white;
    font-size: 15px;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 46px;
}

.custom-select-trigger.active {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-select-trigger i {
    transition: transform 0.3s ease;
}

.custom-select-trigger.active i {
    transform: rotate(180deg);
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #3498db;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 100;
    transition: all 0.2s ease;
    max-height: 200px;
    overflow-y: auto;
}

.custom-select-wrapper.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.custom-option {
    display: block;
    padding: 12px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.custom-option:hover {
    background-color: #f0f8ff;
    color: #3498db;
    font-weight: 600;
}

.custom-option.selected {
    background-color: #3498db;
    color: white;
    font-weight: 600;
}

/* --- ÖZEL BİLDİRİM MODALI (ALERT YERİNE) --- */
.notif-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.notif-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.notif-modal-box {
    background: #ffffff;
    width: 90%;
    max-width: 350px;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notif-modal-overlay.show .notif-modal-box {
    transform: scale(1);
}

.notif-close-x {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #f8f9fa;
    border: none;
    font-family: Arial, sans-serif;
    font-weight: 300;
    font-size: 26px;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px 0 0 0;
}

.notif-close-x:hover { background: #ffeaea; color: #d9534f; }

.notif-modal-box h3 { margin: 0 0 10px 0; font-size: 20px; color: #2c3e50; }
.notif-modal-box p { margin: 0; color: #555; line-height: 1.5; font-size: 15px; }

.notif-actions { margin-top: 25px; }

.notif-btn {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.notif-btn:hover { background: #2980b9; }

.notif-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

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

/* --- ŞİFRE GÖSTER/GİZLE SİMGESİ --- */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    color: #95a5a6;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s ease, transform 0.2s ease;
}

.toggle-password:hover {
    color: #3498db;
    transform: scale(1.1);
}

/* --- GOOGLE BUTONU VE AYIRICI --- */
.google-btn {
    width: 100%;
    padding: 12px;
    background-color: #ffffff;
    color: #333;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.google-btn:hover {
    background-color: #f8f9fa;
    border-color: #95a5a6;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.google-btn img {
    width: 20px;
    height: 20px;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    color: #95a5a6;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.divider span {
    padding: 0 15px;
    font-size: 14px;
    font-weight: 500;
}

/* --- MODAL ALTI YÖNLENDİRME YAZILARI --- */
.auth-switch {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #7f8c8d;
}

.auth-switch span {
    color: #3498db;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
}

.auth-switch span:hover {
    color: #2980b9;
    text-decoration: underline;
}
