/* --- Hip to List UI v24.0 --- */

:root {
    --h2l-bg: #ffffff;
    --h2l-gray-bg: #fafafa;
    --h2l-border: #f0f0f0;
    --h2l-text: #202020;
    --h2l-primary: #db4c3f;
    --h2l-primary-hover: #c53727;
    --h2l-danger: #cc0000;
    --h2l-header-height: 70px; /* Temanızın header yüksekliğine göre ayarlayın */
}

/* --- TEMA SIFIRLAMA (RESET) --- */
/* Sayfa Başlıklarını ve Breadcrumb'ları Gizle */
.page-slug-gorevler .entry-header, 
.page-slug-gorevler .entry-title, 
.page-slug-gorevler .ast-breadcrumb,
h1.entry-title,
header.entry-header,
.ast-archive-description { 
    display: none !important; 
}

/* Astra Container Reset */
.page-slug-gorevler .site-content,
.page-slug-gorevler .ast-container {
    display: block !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* --- ANA YAPI (LAYOUT) --- */
#h2l-app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background: var(--h2l-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
    position: relative;
    margin-top: 20px; /* Header ile yapışmaması için */
}

#h2l-app-container * { box-sizing: border-box; }
#h2l-app-container button { border: none; background: none; cursor: pointer; font-family: inherit; padding: 0; }
#h2l-app-container a { text-decoration: none; color: inherit; }
#h2l-app-container ul { margin: 0; padding: 0; list-style: none; }

/* --- SIDEBAR (SABİT SOL MENÜ) --- */
.h2l-sidebar {
    /* Sticky yerine Fixed kullanarak ekrana çiviliyoruz */
    position: fixed;
    top: 0; 
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--h2l-gray-bg);
    border-right: 1px solid var(--h2l-border);
    padding: 30px 15px;
    overflow-y: auto;
    
    /* Z-Index Ayarı: Tema Header'ının (genelde 100+) altında kalsın */
    z-index: 90; 
    
    /* Admin Bar ve Tema Header Payı */
    padding-top: calc(var(--h2l-header-height) + 32px); 
}

/* Admin Bar yoksa (Çıkış yapılmışsa veya gizliyse) */
body:not(.admin-bar) .h2l-sidebar {
    padding-top: var(--h2l-header-height);
}

.h2l-sidebar-head { font-size: 18px; font-weight: 700; padding: 0 10px 20px; color: #333; }
.h2l-nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; font-size: 14px; color: #444; margin-bottom: 2px; cursor: pointer; }
.h2l-nav-item:hover { background: #eee; }
.h2l-nav-item.active { background: #ffefe5; color: var(--h2l-primary); font-weight: 500; }
.h2l-nav-item i { color: #777; width: 20px; text-align: center; }
.h2l-nav-item.active i { color: #d1453b; }

/* --- MAIN CONTENT (SAĞ İÇERİK) --- */
.h2l-main-wrapper {
    /* Sidebar'ın genişliği kadar soldan boşluk bırak */
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
}

.h2l-dashboard, .h2l-detail {
    padding: 40px 60px 100px;
    width: 100%;
    max-width: 1200px; /* İçerik çok yayılmasın, okunabilir kalsın */
    margin: 0 auto;
}

/* --- DİĞER BİLEŞENLER (Aynı Kalıyor) --- */
.h2l-header-area { margin-bottom: 30px; }
.h2l-title-box { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.h2l-project-count-badge { background: #ff9e9e; color: #8f2c2c; font-size: 13px; font-weight: 600; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 4px; }
.h2l-header-area h1 { font-size: 28px; margin: 0; color: #111; font-weight: 700; }
.h2l-subtitle { color: #808080; font-size: 13px; margin: 0; }

.h2l-controls { margin-bottom: 40px; }
.h2l-search-bar { width: 100%; border: 1px solid #e5e5e5; border-radius: 6px; padding: 10px 15px; display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.h2l-search-bar input { border: none; width: 100%; outline: none; font-size: 14px; color: #333; }

.h2l-filter-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; }

#h2l-app-container .h2l-tabs { display: inline-flex; background-color: #f5f5f5; padding: 4px; border-radius: 8px; gap: 4px; }
#h2l-app-container .h2l-tabs button { padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; color: #555; transition: all 0.1s; background: transparent; white-space: nowrap; }
#h2l-app-container .h2l-tabs button:hover { background-color: rgba(0,0,0,0.05); color: #333; }
#h2l-app-container .h2l-tabs button.active { background-color: #fff; color: #111; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.h2l-right-controls { display: flex; align-items: center; gap: 15px; margin-left: auto; }
.h2l-archive-text { font-size: 13px; color: #666; }
.h2l-toggle { width: 36px; height: 20px; background: #ccc; border-radius: 10px; position: relative; cursor: pointer; }
.h2l-toggle::after { content:''; width: 16px; height: 16px; background: #fff; border-radius: 50%; position: absolute; top: 2px; left: 2px; }

.h2l-add-wrapper { position: relative; }
.h2l-add-wrapper:hover .h2l-dropdown { display: block; }
#h2l-app-container .h2l-btn-add { background-color: #f7f7f7; padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: #333; }
#h2l-app-container .h2l-btn-add:hover { background-color: #eee; }
.h2l-dropdown { display: none; position: absolute; top: 100%; right: 0; background: #fff; border: 1px solid #eee; box-shadow: 0 4px 12px rgba(0,0,0,0.15); border-radius: 6px; width: 160px; z-index: 10; margin-top: 0; padding-top: 5px; }
.h2l-add-wrapper::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 10px; transform: translateY(100%); }
.h2l-dropdown div { padding: 10px 15px; font-size: 13px; cursor: pointer; color: #333; display: flex; gap: 8px; align-items: center; }
.h2l-dropdown div:hover { background: #f9f9f9; color: var(--h2l-primary); }

.h2l-list-header { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: #111; }
.h2l-sort-btn { color: #666; cursor: pointer; display: flex; align-items: center; gap: 5px; }

.h2l-row-item { display: flex; align-items: flex-start; justify-content: space-between; padding: 15px 10px; border-bottom: 1px solid #fcfcfc; cursor: pointer; transition: background 0.1s; border-radius: 6px; }
.h2l-row-item:hover { background: #fafafa; }
.h2l-row-item.nested { margin-left: 30px; border-left: 2px solid transparent; }
.h2l-cell-name { flex: 1; display: flex; align-items: flex-start; gap: 15px; }
.h2l-hash { color: #999; font-size: 18px; font-weight: 300; margin-top: -2px; }
.h2l-name-content { display: flex; flex-direction: column; }
.h2l-row-title { font-size: 15px; color: #202020; font-weight: 500; }
.h2l-row-desc { font-size: 12px; color: #27ae60; margin-top: 4px; }
.h2l-cell-right { display: flex; align-items: center; gap: 25px; }
.h2l-avatars { display: flex; }
.h2l-avatar { width: 26px; height: 26px; min-width: 26px; border-radius: 50%; border: 2px solid #fff; margin-right: -8px; background: #eee; object-fit: cover; flex-shrink: 0; }
.h2l-cell-stats { font-size: 13px; color: #666; display: flex; align-items: center; min-width: 40px; }
.h2l-cell-actions { color: #999; opacity: 0; padding: 5px; }
.h2l-row-item:hover .h2l-cell-actions { opacity: 1; }

.h2l-folder-row { display: flex; justify-content: space-between; padding: 15px 5px; cursor: pointer; border-bottom: 1px solid #fbfbfb; }
.h2l-folder-row:hover { background: #fcfcfc; }
.h2l-folder-left { display: flex; align-items: center; gap: 10px; }
.h2l-folder-name { font-size: 15px; color: #333; font-weight: 500; }
.h2l-folder-right { font-size: 12px; color: #999; display: flex; align-items: center; gap: 10px; }

/* Modal Update */
.h2l-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 999; display: flex; justify-content: center; align-items: center; }
.h2l-modal { background: #fff; border-radius: 8px; width: 480px; box-shadow: 0 15px 40px rgba(0,0,0,0.2); padding: 0; overflow: visible; display: flex; flex-direction: column; max-height: 90vh; }
.h2l-modal.medium { width: 550px; }
.h2l-modal.small { width: 420px; }
.h2l-modal-header { padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; font-weight: 700; background: #fff; }
.h2l-close-icon { color: #666; font-size: 18px; cursor: pointer; }
.h2l-modal-body { padding: 20px 25px; overflow-y: auto; }
.h2l-modal-body.compact { padding: 15px 20px; }
.h2l-form-group { margin-bottom: 15px; }
.h2l-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #333; }
.h2l-label.small-caps { text-transform: uppercase; font-size: 11px; color: #888; }
.h2l-input-wrapper { position: relative; }
.h2l-input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; outline: none; }
.h2l-input:focus { border-color: #888; }
.h2l-input.with-counter { padding-right: 55px; }
.h2l-char-counter { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; color: #999; pointer-events: none; }
.h2l-textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-family: inherit; font-size: 14px; outline: none; resize: vertical; }
.h2l-textarea:focus { border-color: #888; }
.h2l-color-input-wrapper { position: relative; }
.h2l-color-dot { width: 12px; height: 12px; border-radius: 50%; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; z-index: 2; border: 1px solid rgba(0,0,0,0.1); }
.h2l-select { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; outline: none; background: #fff; cursor: pointer; appearance: none; }
.h2l-select.padded { padding-left: 35px; }
.h2l-form-row { display: flex; gap: 15px; margin-bottom: 15px; }
.h2l-form-row > div { flex: 1; }
.h2l-multi-select { position: relative; width: 100%; }
.h2l-multi-trigger { border: 1px solid #ddd; padding: 10px 12px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 14px; background: #fff; }
.h2l-multi-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #eee; border-radius: 6px; box-shadow: 0 5px 15px rgba(0,0,0,0.15); z-index: 100; margin-top: 5px; max-height: 200px; overflow-y: auto; }
.h2l-multi-item { padding: 8px 12px; display: flex; align-items: center; cursor: pointer; font-size: 13px; }
.h2l-multi-item:hover { background: #f5f5f5; }
.h2l-multi-item.selected { background: #fff5f5; color: var(--h2l-primary); }
.h2l-access-options { display: flex; gap: 10px; }
.h2l-access-btn { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 6px; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: #555; transition: all 0.2s; }
.h2l-access-btn:hover { background: #f9f9f9; border-color: #ccc; color: #333 !important; }
.h2l-access-btn.selected { background: #fff0ed; border-color: var(--h2l-primary); color: var(--h2l-primary) !important; font-weight: 600; }
.h2l-access-btn.selected i { color: var(--h2l-primary); }
.h2l-view-options { display: flex; gap: 10px; }
.h2l-view-card { flex: 1; border: 1px solid #ddd; border-radius: 6px; padding: 12px; display: flex; flex-direction: column; align-items: center; cursor: pointer; background: #fff; font-size: 13px; color: #555; transition: all 0.1s; }
.h2l-view-card:hover { background: #f9f9f9; }
.h2l-view-card.selected { border-color: var(--h2l-primary); background: #fff5f5; color: var(--h2l-primary); font-weight: 600; }
.switch-row { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-top: 5px; }
.h2l-switch { position: relative; display: inline-block; width: 36px; height: 20px; margin: 0; }
.h2l-switch input { opacity: 0; width: 0; height: 0; }
.h2l-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .3s; border-radius: 20px; }
.h2l-slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: white; transition: .3s; border-radius: 50%; }
input:checked + .h2l-slider { background-color: var(--h2l-primary); }
input:checked + .h2l-slider:before { transform: translateX(16px); }
.h2l-switch-label { font-size: 14px; color: #333; cursor: pointer; }
.h2l-modal-footer { padding: 15px 25px; background: #fff; border-top: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; border-radius: 0 0 8px 8px; }
.h2l-footer-right { display: flex; gap: 10px; }
#h2l-app-container .h2l-btn { padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; background-color: #eee; color: #333; }
#h2l-app-container .h2l-btn:hover { background-color: #e0e0e0; }
#h2l-app-container .h2l-btn.primary { background-color: var(--h2l-primary); color: #fff; }
#h2l-app-container .h2l-btn.primary:hover { background-color: var(--h2l-primary-hover); }
#h2l-app-container .h2l-btn.primary:disabled { opacity: 0.5; cursor: not-allowed; }
#h2l-app-container .h2l-btn.text-danger { background: none; color: var(--h2l-danger); padding: 0; }
#h2l-app-container .h2l-btn.text-danger:hover { text-decoration: underline; }
.h2l-task-item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #f9f9f9; }
.h2l-task-item:hover { background: #fafafa; }
.h2l-check-circle { width: 20px; height: 20px; border: 2px solid #ccc; border-radius: 50%; margin-right: 15px; cursor: pointer; }
.h2l-task-text { font-size: 14px; flex: 1; }
.h2l-quick-add { display: flex; align-items: center; margin-top: 15px; padding-bottom: 10px; }
.h2l-quick-add input { flex: 1; border: none; font-size: 14px; outline: none; margin-left: 10px; }

/* Mobile */
@media (max-width: 768px) {
    #h2l-app-container { flex-direction: column; height: auto; }
    .h2l-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #eee; height: auto; position: relative; }
    .h2l-main-wrapper { margin-left: 0; width: 100%; }
    .h2l-dashboard, .h2l-detail { padding: 20px; }
}