/* assets/css/style.css */

/* ==========================================================================
   1. GENEL SIFIRLAMA VE AYARLAR
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8fafc;
    color: #1e293b;
}

/* ==========================================================================
   2. GİRİŞ, KAYIT OL & PROFİL TAMAMLA (AUTH) ORTAK TASARIMI
   ========================================================================== */
.auth-body { 
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex; 
    justify-content: center; 
    align-items: center; 
    height: 100vh; 
}

.auth-container { 
    background: #ffffff; 
    padding: 45px; 
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); 
    width: 100%;
    max-width: 460px; 
}

.auth-tabs {
    display: flex;
    background-color: #f1f5f9;
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 30px;
}

.auth-tabs a {
    flex: 1;
    text-align: center;
    padding: 12px;
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.auth-tabs a.active {
    background-color: #ffffff;
    color: #3498db;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.auth-form .form-group { 
    margin-bottom: 22px; 
}

.form-group label { 
    display: block; 
    margin-bottom: 8px; 
    color: #475569;
    font-size: 14px;
    font-weight: 500;
}

.form-group input { 
    width: 100%; 
    padding: 14px 16px; 
    border: 1px solid #cbd5e1; 
    border-radius: 10px; 
    font-size: 15px;
    transition: all 0.2s ease;
    background-color: #f8fafc;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

/* Küresel Butonlar */
.btn { 
    width: 100%; 
    padding: 14px; 
    border: none; 
    border-radius: 10px; 
    font-size: 16px; 
    font-weight: 600;
    cursor: pointer; 
    transition: background-color 0.2s;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-primary { background-color: #3498db; color: white; }
.btn-primary:hover { background-color: #2980b9; }

/* Dinamik Bildirimler */
.alert { 
    padding: 12px; 
    margin-bottom: 20px; 
    border-radius: 10px; 
    text-align: center; 
    font-size: 14px; 
}
.alert-error { background-color: #fde8e8; color: #e74c3c; border: 1px solid #f8b4b4; }
.alert-success { background-color: #eafaf1; color: #2ecc71; border: 1px solid #a3e4d7; }


/* ==========================================================================
   3. PANEL ANA MİMARİSİ (Sol Menü & Sağ İçerik)
   ========================================================================== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #f8fafc;
    align-items: stretch !important;
}

/* Sol Sabit Menü (Sidebar) */
.sidebar {
    width: 280px;
    background-color: #1e293b; 
    color: #ffffff;
    padding: 35px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 10px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
   
    height: 100% !important; /* Sabit boyu iptal eder, sonsuza kadar uzamasını sağlar */
    min-height: 100vh !important;
    padding-bottom: 50px !important;
}

.sidebar-profile {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 1px solid #334155;
    margin-bottom: 25px;
}

.profile-avatar {
    font-size: 40px;
    background: #334155;
    width: 70px;
    height: 70px;
    line-height: 70px;
    border-radius: 50%;
    margin: 0 auto 15px auto;
}

.sidebar-profile h3 { 
    font-size: 19px; 
    font-weight: 600; 
    color: #ffffff; 
    margin-bottom: 15px; 
    word-break: break-word; 
}

.profile-details {
    text-align: left;
    background: #1e293b;
    padding: 14px;
    border-radius: 12px;
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid #334155;
}

.profile-details p strong {
    color: #cbd5e1;
}

.profile-details i {
    color: #64748b;
}

/* Sidebar Menü Linkleri */
.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    height: 100%;
}

.sidebar-menu a {
    display: block;
    padding: 14px 16px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: #334155;
    color: #ffffff;
}

.sidebar-menu a.logout-btn {
    margin-top: auto; 
    color: #f87171;
    border: 1px dashed rgba(248, 113, 113, 0.2);
}

.sidebar-menu a.logout-btn:hover {
    background-color: #ef4444;
    color: white;
    border-color: transparent;
}

/* Sağ Dinamik İçerik Alanı */
.main-content {
    flex: 1;
    padding: 50px;
    overflow-y: auto;
}

.page-header h2 { color: #0f172a; font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.page-header .subtitle { color: #64748b; font-size: 16px; margin-bottom: 40px; }


/* ==========================================================================
   4. MODÜLER KARTLAR VE GELECEKTEKİ TABLOLAR
   ========================================================================== */

/* Dashboard İçindeki Büyük Oval Kartlar */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.action-card {
    background: #ffffff;
    padding: 35px 30px;
    border-radius: 20px; 
    text-decoration: none;
    color: #1e293b;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    border-color: #3498db;
}

.card-icon { font-size: 36px; margin-bottom: 15px; }
.action-card h4 { font-size: 20px; font-weight: 600; margin-bottom: 10px; color: #0f172a; }
.action-card p { font-size: 14px; color: #64748b; line-height: 1.5; margin-bottom: 20px; flex: 1; }
.card-btn { font-size: 14px; font-weight: 600; color: #3498db; transition: color 0.2s; }
.action-card:hover .card-btn { color: #2980b9; }

/* Bir sonraki adımda yapacağımız belgeler.php tablosu için oval yapılar */
.table-container {
    background: #ffffff;
    border-radius: 16px; 
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.custom-table th {
    background-color: #f8fafc;
    color: #475569;
    padding: 16px;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #e2e8f0;
}

.custom-table td {
    padding: 16px;
    color: #334155;
    font-size: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.custom-table tr:last-child td { border-bottom: none; }
.custom-table tr:hover td { background-color: #f8fafc; }

.table-btn {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-right: 5px;
    transition: all 0.2s ease;
}
.table-btn-view { background-color: #e0f2fe; color: #0369a1; }
.table-btn-view:hover { background-color: #bae6fd; }
.table-btn-down { background-color: #dcfce7; color: #15803d; }
.table-btn-down:hover { background-color: #bbf7d0; }

/* Fotoğrafın taşmasını engelleyen koruyucu kutu */
.profile-avatar-box {
    width: 90px !important;
    height: 90px !important;
    border-radius: 50% !important;
    border: 3px solid #3498db !important;
    margin: 0 auto 15px auto !important;
    overflow: hidden !important; /* Kutudan taşan her şeyi görünmez yapar */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #2c3e50 !important;
}

/* Kutunun içindeki resmin ayarı */
.profile-avatar-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Resmi ezmeden kutuya oranlar */
    display: block !important;
}

/* Eğer resim yoksa emojinin duruşu */
.profile-avatar-box .emoji-avatar {
    font-size: 40px !important;
    line-height: 1 !important;
}


/* ==========================================================================
   📷 PROFİL RESMİ KUTUSU VE TAŞMA ENGELLEME SİSTEMİ
   ========================================================================== */
.profile-avatar-box {
    width: 90px !important;
    height: 90px !important;
    border-radius: 50% !important;
    border: 3px solid #3498db !important;
    margin: 0 auto 15px auto !important;
    overflow: hidden !important; /* Kutudan taşan her şeyi kesin olarak gizler */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #2c3e50 !important;
}

/* Kutunun içindeki resmin ezilmeden sığma ayarı */
.profile-avatar-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Resmi oranlayarak kutuya hapseder */
    display: block !important;
}

/* Eğer resim yoksa duracak olan varsayılan emoji avatar */
.profile-avatar-box .emoji-avatar {
    font-size: 40px !important;
    line-height: 1 !important;
}

/* ==========================================================================
   ✂️ FOTOĞRAF KIRPMA MODAL SİSTEMİ (CROPPER)
   ========================================================================== */
.crop-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px); /* Arka planı hafifçe bulandırarak premium hava katar */
}

.crop-modal-content {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: modalFadeIn 0.3s ease;
}

.image-container {
    max-height: 350px;
    margin-bottom: 20px;
    overflow: hidden;
    background: #f1f5f9;
    border-radius: 8px;
}

.image-container img {
    max-width: 100%;
    display: block;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Modalın yumuşak açılması için animasyon */
@keyframes modalFadeIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   🏷️ SIDEBAR LOGO ALANI STİLLERİ
   ========================================================================== */
.sidebar-logo-area {
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Menüyle logoyu ayıran şık çizgi */
    margin-bottom: 20px;
}

.sidebar-logo-area .text-logo {
    text-decoration: none;
    display: flex;
    flex-direction: column; /* furkan bilir ve com alt alta gelsin diye */
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif; /* Eğer projede varsa */
    font-weight: 800;
}

.sidebar-logo-area .brand-name {
    color: #ffffff;
    font-size: 1.3rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.2;
}

.sidebar-logo-area .brand-sub {
    color: #3498db; /* Seçtiğimiz canlı mavi renk */
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Sidebar içindeki eski margin ayarlarını logoya göre esnetiyoruz */
.sidebar-profile {
    margin-top: 10px !important;
}

/* Sidebar içindeki logoyu boyutlandır ve merkeze al */
.sidebar-logo-area {
    padding: 20px;
    text-align: center;
}

.sidebar-logo-area img {
    max-width: 150px; /* Logonun boyutunu buradan istediğin gibi ayarla */
    height: auto;     /* Görselin orantısını korur */
    display: block;
    margin: 0 auto;
}

/* Giriş ve Kayıt Sayfası Logo */
.auth-logo img {
    width: 160px !important;    /* Sabit genişlik */
    height: auto !important;    /* Orantıyı koru */
    display: block !important;  /* Blok element yap */
    margin: 0 auto !important;  /* Merkeze yasla */
    transition: transform 0.4s ease;
}

/* Sidebar (Panel) Logo */
.sidebar-logo-area img {
    width: 150px !important;    /* Sidebar'a sığacak genişlik */
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Büyüme efekti */
.auth-logo img:hover, .sidebar-logo-area img:hover {
    transform: scale(1.1);
}


