/* ─────────────────────────────────────────────────────────────
   TNOTE — Modern Liste & Not Modülü Stilleri
───────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-light: #f0f9ff;
    --success: #0284c7;
    --success-light: #f0f9ff;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --neutral: #64748b;
    --neutral-light: #f8fafc;
    --purple: #475569;
    --purple-light: #f1f5f9;
}

body, .tnote-container, input, textarea, select, button {
    font-family: var(--font-sans);
}

/* ── SVG Vector Icon Utilities ── */
.svg-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}
.svg-icon-xs {
    width: 13px;
    height: 13px;
    stroke-width: 1.8;
}
.svg-icon-sm {
    width: 16px;
    height: 16px;
    stroke-width: 1.8;
}
.svg-icon-lg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.tnote-container {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    transition: grid-template-columns 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: var(--surface, #ffffff);
}

/* ── Sol Kenar Çubuğu (Sidebar) ── */
.sidebar-brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px 8px 10px;
    border-bottom: 1px solid var(--border, #e2e8f0);
    margin-bottom: 4px;
    flex-shrink: 0;
}
.sidebar-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.sidebar-brand-img {
    height: 24px;
    width: auto;
    max-width: 135px;
    object-fit: contain;
    display: block;
}
.tnote-sidebar {
    background: #f8fafc;
    border: none;
    border-right: 1px solid var(--border, #e2e8f0);
    border-radius: 0;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    max-height: 100%;
    position: relative;
    top: 0;
    box-shadow: none;
    box-sizing: border-box;
    overflow: hidden;
    width: 260px;
    max-width: 100%;
    transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s ease, padding 0.2s ease;
    z-index: 100;
}

.sidebar-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border, #e2e8f0);
    flex-shrink: 0;
    min-height: 26px;
    white-space: nowrap;
}

.sidebar-title {
    font-size: 0.92rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Notebook Header Dropdown (OneNote Style) */
.sidebar-notebook-header {
    position: relative;
    padding: 4px 6px;
}

.notebook-dropdown-container {
    position: relative;
    flex: 1;
    min-width: 0;
}

.notebook-select-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface2, #f8fafc);
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 6px;
    padding: 3px 6px;
    cursor: pointer;
    font-size: 0.80rem;
    font-weight: 700;
    color: var(--text, #0f172a);
    text-align: left;
    transition: all 0.15s ease;
}

.notebook-select-btn:hover {
    background: #eff6ff;
    border-color: var(--accent, #3b82f6);
}

.notebook-btn-icon {
    font-size: 0.95rem;
    flex-shrink: 0;
}

.notebook-btn-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notebook-btn-arrow {
    font-size: 0.72rem;
    color: var(--muted, #64748b);
    flex-shrink: 0;
}

.notebook-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 230px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    z-index: 1000;
    padding: 4px;
    display: flex;
    flex-direction: column;
}

.notebook-dropdown-title {
    font-size: 0.70rem;
    font-weight: 600;
    text-transform: none;
    color: var(--muted, #64748b);
    padding: 4px 8px 2px 8px;
    letter-spacing: normal;
}

.notebook-dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 200px;
    overflow-y: auto;
}

.notebook-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text, #1e293b);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
}

.notebook-dropdown-item:hover {
    background: var(--surface2, #f1f5f9);
}

.notebook-dropdown-item.active {
    background: #eff6ff;
    color: var(--accent, #2563eb);
    font-weight: 600;
}

.nb-item-icon {
    font-size: 0.92rem;
    flex-shrink: 0;
}

.nb-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nb-item-check {
    color: var(--accent, #2563eb);
    font-weight: bold;
    font-size: 0.82rem;
}

.notebook-dropdown-divider {
    height: 1px;
    background: var(--border, #e2e8f0);
    margin: 4px 0;
}

.notebook-action-item {
    color: var(--accent, #2563eb);
    font-weight: 600;
}

.sidebar-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Manuel Menü Daraltma / Genişletme Butonu (« / ») */
.sidebar-toggle-btn {
    background: transparent;
    border: 1px solid var(--border, #dee2e6);
    border-radius: 6px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    color: var(--text, #334155);
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-btn:hover {
    background: var(--surface2, #e9ecef);
    color: var(--accent, #0284c7);
    border-color: var(--accent, #0284c7);
}

/* Sidebar Genel Bakış Butonu */
.sidebar-overview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px;
    margin: 1px 0 3px 0;
    border-radius: 4px;
    background: var(--surface2, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    flex-shrink: 0;
}

.sidebar-overview-row:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.sidebar-overview-row.active {
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
    color: #1d4ed8 !important;
}

.sidebar-overview-row.active .ov-row-icon svg {
    stroke: #1d4ed8;
}

.overview-row-left {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

.ov-row-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.overview-btn-text {
    font-size: 0.80rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ov-badge-pill {
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(2, 132, 199, 0.12);
    color: var(--accent, #0284c7);
    font-weight: 600;
}

/* ── Manuel Daraltılmış Mod (.sidebar-collapsed) ── */
.tnote-container.sidebar-collapsed {
    grid-template-columns: 52px minmax(0, 1fr);
}

.tnote-container.sidebar-collapsed .tnote-sidebar {
    width: 52px;
    padding: 8px 4px;
}

.tnote-container.sidebar-collapsed .sidebar-brand-header {
    justify-content: center;
    padding: 6px 0;
}

.tnote-container.sidebar-collapsed .sidebar-brand-img {
    display: none !important;
}

.tnote-container.sidebar-collapsed .sidebar-notebook-header {
    display: none !important;
}

/* Daraltılmışken gizlenecek bileşenler (hover yok, tamamen manuel) */
.tnote-container.sidebar-collapsed .sidebar-title,
.tnote-container.sidebar-collapsed .notebook-dropdown-container,
.tnote-container.sidebar-collapsed .sidebar-header-actions .btn-icon:not(.sidebar-toggle-btn),
.tnote-container.sidebar-collapsed .cat-drag-handle,
.tnote-container.sidebar-collapsed .cat-chevron,
.tnote-container.sidebar-collapsed .category-title-text,
.tnote-container.sidebar-collapsed .category-actions,
.tnote-container.sidebar-collapsed .page-list,
.tnote-container.sidebar-collapsed .sidebar-footer-text,
.tnote-container.sidebar-collapsed .sidebar-overview-row .overview-btn-text,
.tnote-container.sidebar-collapsed .sidebar-overview-row .ov-badge-pill {
    display: none !important;
}

.tnote-container.sidebar-collapsed .sidebar-header {
    justify-content: center;
    padding: 4px 0 6px 0;
    border-bottom: 1px solid var(--border, #dee2e6);
}

.tnote-container.sidebar-collapsed .sidebar-header-actions {
    display: flex;
    justify-content: center;
    width: 100%;
}

.tnote-container.sidebar-collapsed .sidebar-toggle-btn {
    width: 36px;
    height: 32px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface2, #f1f5f9);
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 6px;
    cursor: pointer;
}

.tnote-container.sidebar-collapsed .sidebar-overview-row {
    justify-content: center;
    padding: 6px 0;
    border-color: transparent;
    background: transparent;
}

.tnote-container.sidebar-collapsed .sidebar-overview-row .ov-row-icon {
    font-size: 1.15rem;
}

.tnote-container.sidebar-collapsed .category-header {
    justify-content: center;
    padding: 6px 0;
}

.tnote-container.sidebar-collapsed .category-title-area {
    justify-content: center;
    gap: 0;
}

.tnote-container.sidebar-collapsed .cat-icon-span {
    font-size: 1.15rem !important;
}

.tnote-container.sidebar-collapsed .sidebar-footer {
    justify-content: center;
    align-items: center;
    padding: 6px 0 4px 0;
}

.tnote-container.sidebar-collapsed .sidebar-footer-tools {
    flex-direction: column !important;
    gap: 4px !important;
    width: 100% !important;
    align-items: center !important;
}

.tnote-container.sidebar-collapsed .footer-tool-btn .tool-label {
    display: none !important;
}

.tnote-container.sidebar-collapsed .footer-tool-btn {
    width: 32px !important;
    height: 30px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: none !important;
}

.tnote-container.sidebar-collapsed .sidebar-footer-profile {
    padding: 4px !important;
    justify-content: center !important;
}

.tnote-container.sidebar-collapsed .profile-info,
.tnote-container.sidebar-collapsed .profile-action-btn,
.tnote-container.sidebar-collapsed .profile-login-btn {
    display: none !important;
}

.tnote-container.sidebar-collapsed .sidebar-categories {
    scrollbar-width: none;
}
.tnote-container.sidebar-collapsed .sidebar-categories::-webkit-scrollbar {
    display: none;
}

/* ── Mobil Çekmece (Off-Canvas Drawer) & Responsive Kurallar ── */
.btn-mobile-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 1rem;
    background: var(--surface2, #f1f5f9);
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 6px;
    color: var(--text, #1e293b);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.btn-mobile-sidebar-toggle:hover {
    background: #e2e8f0;
}

.sidebar-mobile-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 0.95rem;
    color: var(--muted, #64748b);
    background: transparent;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sidebar-mobile-close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

.tnote-sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 1999;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tnote-sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

@media (max-width: 860px) {
    .tnote-container {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        height: auto !important;
        min-height: 100vh !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .tnote-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        overflow: hidden !important;
        z-index: 2000 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        border: none !important;
        border-right: 1px solid var(--border, #cbd5e1) !important;
        background: var(--surface, #ffffff) !important;
        padding: 10px 8px !important;
    }
    .tnote-sidebar.mobile-open {
        transform: translateX(0) !important;
        box-shadow: 6px 0 25px rgba(0, 0, 0, 0.3) !important;
    }
    .btn-mobile-sidebar-toggle {
        display: inline-flex !important;
    }
    .sidebar-mobile-close-btn {
        display: inline-flex !important;
    }
    .sidebar-toggle-btn {
        display: none !important;
    }
    .tnote-content {
        padding: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
}

.sidebar-nav-block {
    flex-shrink: 0;
}

.sidebar-categories {
    flex: 1 1 auto;
    min-height: 0; /* Flexbox içinde kaydırma çubuğunun devreye girmesi için zorunlu */
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-categories::-webkit-scrollbar {
    width: 4px;
}
.sidebar-categories::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-categories::-webkit-scrollbar-thumb {
    background: var(--border, #cbd5e1);
    border-radius: 4px;
}
.sidebar-categories::-webkit-scrollbar-thumb:hover {
    background: var(--muted, #94a3b8);
}

.btn-icon {
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--muted, #64748b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-icon:hover {
    background: var(--surface2, #f1f5f9);
    color: var(--text, #0f172a);
}

/* ── Drag & Drop Stilleri - Android Tarzı 1.5s Basılı Tutma ── */
.drag-handle,
.item-drag-handle,
.cat-drag-handle,
.page-drag-handle {
    display: none !important;
}

/* Android Launcher Tarzı Ayrılma ve Taşıma Efekti (1.5s Basılı Tutma) */
.android-lifted-item {
    transform: scale(1.03) rotate(0.8deg) translateY(-4px) !important;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28), 0 0 0 2px var(--accent, #0284c7) !important;
    z-index: 99999 !important;
    position: relative !important;
    opacity: 0.96 !important;
    transition: transform 0.18s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.18s ease !important;
    border-radius: 8px !important;
    background: var(--surface, #ffffff) !important;
    user-select: none !important;
}

.is-dragging {
    opacity: 0.35 !important;
    background: rgba(2, 132, 199, 0.12) !important;
    border: 1px dashed var(--accent, #0284c7) !important;
}

.drop-target-above {
    border-top: 2px solid var(--accent, #0284c7) !important;
}

.drop-target-below {
    border-bottom: 2px solid var(--accent, #0284c7) !important;
}

.cat-drop-hover {
    background: rgba(2, 132, 199, 0.15) !important;
    outline: 2px dashed var(--accent, #0284c7) !important;
    border-radius: 6px;
}

.category-group {
    margin-bottom: 2px;
    border-radius: var(--radius-sm, 6px);
    overflow: hidden;
    transition: background 0.15s, box-shadow 0.15s;
    background: transparent;
    border-left: none !important;
}
.category-group:hover {
    background: var(--surface2, #f1f5f9);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.80rem;
    font-weight: 700;
    color: var(--text, #0f172a);
    text-transform: none !important;
    letter-spacing: normal;
    padding: 3px 5px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    min-width: 0;
}

.cat-color-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    margin-right: 4px;
    box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.06);
}

/* Kategori Ayracı / Bölücü Çizgi */
.category-divider-item {
    margin: 4px 4px 3px;
    padding: 1px 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.cat-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border, #cbd5e1);
}
.cat-divider-label {
    font-size: 0.70rem;
    font-weight: 600;
    color: var(--muted, #64748b);
    text-transform: none !important;
    letter-spacing: normal;
    padding: 0 4px;
    white-space: nowrap;
}
.cat-divider-del-btn {
    opacity: 0;
    transition: opacity 0.15s;
    padding: 0 3px !important;
    font-size: 0.65rem !important;
    height: 18px !important;
    width: 18px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    color: var(--muted, #64748b);
    cursor: pointer;
}
.category-divider-item:hover .cat-divider-del-btn {
    opacity: 0.75;
}
.category-divider-item:hover .cat-divider-del-btn:hover {
    opacity: 1;
    color: #ef4444 !important;
}

.category-header:hover {
    background: var(--surface2, #e9ecef);
    color: var(--text, #212529);
}

.category-title-area {
    display: flex;
    align-items: center;
    gap: 3px;
    overflow: hidden;
    min-width: 0;
    flex: 1;
}

.cat-chevron {
    font-size: 0.75rem;
    line-height: 1;
    color: var(--muted, #94a3b8);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    text-align: center;
    flex-shrink: 0;
    transform: rotate(0deg);
}

.category-group.collapsed .cat-chevron {
    transform: rotate(-90deg);
}

.category-title-text {
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.80rem;
    font-weight: 700;
    color: var(--text, #0f172a);
    text-transform: none !important;
    letter-spacing: normal;
    min-width: 0;
    flex: 1;
}

.category-actions, .page-item-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Sidebar Butonları — Hover olmadığı sürece yer kaplamaz (display: none), sıfır kayma */
.category-actions .btn-icon-subtle,
.category-actions .cat-add-page-btn,
.page-item-actions .btn-icon-subtle {
    display: none;
    opacity: 0.9;
    pointer-events: auto;
    width: 22px;
    height: 22px;
    padding: 2px;
    margin: 0;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
    color: var(--muted, #64748b);
    border: none;
    background: transparent;
    cursor: pointer;
}

.category-header:hover .category-actions .btn-icon-subtle,
.category-header:hover .category-actions .cat-add-page-btn,
.page-item:hover .page-item-actions .btn-icon-subtle,
.page-item.active .page-item-actions .btn-icon-subtle {
    display: inline-flex;
}

.category-actions .btn-icon-subtle:hover,
.page-item-actions .btn-icon-subtle:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text, #0f172a);
}

.category-actions .btn-danger-hover:hover,
.page-item-actions .btn-danger-hover:hover {
    color: var(--danger, #ef4444);
    background: rgba(239, 68, 68, 0.12);
}

.category-header:hover .category-actions .cat-add-page-btn:hover {
    color: var(--tinc-primary, #0284c7);
    background: rgba(2, 132, 199, 0.12);
}

/* Hover esnasında sayaç rozetini gizleyip yerine butonları aç: Apple macOS Finder/Notes standardı */
.category-header:hover .badge-count:not(.ov-badge-pill),
.page-item:hover .badge-count:not(.ov-badge-pill) {
    display: none !important;
}

/* Mobil görünümde butonlar daima erişilebilir olsun */
@media (max-width: 860px) {
    .category-actions .btn-icon-subtle,
    .page-item-actions .btn-icon-subtle,
    .category-actions .cat-add-page-btn {
        display: inline-flex !important;
        opacity: 0.85;
    }
    .category-header:hover .badge-count:not(.ov-badge-pill),
    .page-item:hover .badge-count:not(.ov-badge-pill) {
        display: none !important;
    }
}

.btn-icon-subtle {
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8rem;
    line-height: 1;
    color: var(--muted, #64748b);
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-icon-subtle:hover {
    background: var(--surface2, #f1f5f9);
    color: var(--text, #0f172a);
}

.btn-danger-hover:hover {
    background: #fee2e2 !important;
}

.btn-primary-icon {
    background: var(--accent, #0d6efd) !important;
    color: white !important;
    border: 1px solid var(--accent, #0d6efd) !important;
}

.btn-primary-icon:hover {
    background: #0b5ed7 !important;
}

.page-list {
    list-style: none;
    padding: 0 0 0 3px;
    margin: 1px 0 2px 5px;
    border-left: 1.5px solid var(--border, #cbd5e1);
    display: flex;
    flex-direction: column;
    gap: 1px;
    transition: max-height 0.24s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, margin 0.2s ease;
    max-height: 2000px;
    opacity: 1;
    overflow: hidden;
}

.category-group.collapsed .page-list {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-left-color: transparent !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.page-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 5px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text, #334155);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.82rem;
    min-width: 0;
}

.page-item:hover {
    background: var(--surface2, #f1f5f9);
    color: var(--accent, #0284c7);
}

.page-item.active {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
}

.page-item-info {
    display: flex;
    align-items: center;
    gap: 3px;
    overflow: hidden;
    min-width: 0;
    flex: 1;
}

.page-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.82rem;
    min-width: 0;
    flex: 1;
}

.badge-count {
    margin-left: auto;
    font-size: 0.70rem;
    font-weight: 600;
    color: var(--muted, #64748b);
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 1px 6px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    transition: opacity 0.15s ease;
}
.badge-count:empty {
    display: none !important;
}

.current-page-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent, #0284c7);
}

/* ── Ana İçerik Alanı (Monolithic Canvas) ── */
.tnote-content {
    background: var(--surface, #ffffff);
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 0 20px;
    min-height: 48px;
    height: 48px;
    border-bottom: 1px solid var(--border, #f1f5f9);
    background: var(--surface, #ffffff);
    position: sticky;
    top: 0;
    z-index: 50;
    box-sizing: border-box;
}

.content-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    height: 100%;
}

.content-title-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-title {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.35;
    color: var(--text, #0f172a);
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ── Full-Width Reading & Task Canvases (Üst Bar ile Uyumlu Tam Genişlik) ── */
#overview-view {
    max-width: 100%;
    margin: 0;
    width: 100%;
    min-width: 0;
    padding: 20px 24px 40px 24px;
    box-sizing: border-box;
}

#quick-tasks-view {
    max-width: 100%;
    margin: 0;
    width: 100%;
    min-width: 0;
    padding: 16px 24px 40px 24px;
    box-sizing: border-box;
}

#checklist-view {
    max-width: 100%;
    margin: 0;
    width: 100%;
    min-width: 0;
    padding: 16px 24px 40px 24px;
    box-sizing: border-box;
}

#quick-add-container {
    max-width: 100%;
    margin: 12px 0 0 0;
    width: 100%;
    min-width: 0;
    padding: 0 24px;
    box-sizing: border-box;
}

#note-view {
    max-width: 100%;
    margin: 0;
    width: 100%;
    min-width: 0;
    padding: 16px 24px 48px 24px;
    box-sizing: border-box;
}

#finance-view,
#project-view,
#academic-view,
#software-view {
    max-width: 100%;
    margin: 0;
    width: 100%;
    min-width: 0;
    padding: 20px 24px 40px 24px;
    box-sizing: border-box;
}

#vault-view,
#trash-view,
#calendar-view,
#quick-notes-view,
#tasks-view {
    max-width: 100%;
    margin: 0;
    width: 100%;
    min-width: 0;
    padding: 18px 24px 40px 24px;
    box-sizing: border-box;
}

@media (max-width: 860px) {
    .content-header {
        padding: 8px 14px !important;
    }
    #overview-view,
    #quick-tasks-view,
    #checklist-view,
    #note-view,
    #finance-view,
    #project-view,
    #academic-view,
    #software-view,
    #vault-view,
    #trash-view,
    #calendar-view,
    #quick-notes-view,
    #tasks-view {
        padding: 14px 14px 24px 14px !important;
    }
    #quick-add-container {
        padding: 0 14px !important;
        margin-top: 10px !important;
    }
}

/* ── Hızlı Madde Ekleme Alanı (Microsoft To Do / Apple Notes Capsule) ── */
.quick-add-box {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    padding: 6px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.quick-add-box:focus-within {
    border-color: var(--accent, #0284c7);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08), 0 0 0 2px rgba(2, 132, 199, 0.15);
    background: var(--surface, #ffffff);
}

.quick-add-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-input {
    flex: 1;
    height: 36px;
    padding: 6px 4px;
    font-size: 0.92rem;
    font-weight: 400;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text, #0f172a);
    outline: none;
}

.quick-input:focus {
    border: none;
    box-shadow: none;
}

.quick-details {
    display: none;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.quick-details.open {
    display: grid;
}

@media (max-width: 600px) {
    .quick-details {
        grid-template-columns: 1fr;
    }
}

/* ── Liste Öğeleri (Items) ── */
.items-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--muted, #6c757d);
}

.items-filter {
    display: flex;
    gap: 4px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--muted, #64748b);
    transition: all 0.15s ease;
}

.filter-btn.active {
    background: #e0f2fe;
    color: var(--accent, #0284c7);
    border-color: #bae6fd;
    font-weight: 600;
}

.items-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-card {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border, #f1f5f9);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    transition: background 0.12s ease;
}

.item-card:hover {
    background: var(--surface2, #f8fafc);
    border-color: var(--border, #f1f5f9);
    box-shadow: none;
}

.item-card.done {
    background: transparent;
    opacity: 0.50;
}

.completed-accordion-header {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, border-color 0.15s;
}
.completed-accordion-header:hover {
    background: var(--surface3, #e2e8f0) !important;
    border-color: #cbd5e1 !important;
}

.item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow: hidden;
}

.item-checkbox {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: var(--primary, #0284c7);
    border-radius: 50%;
    flex-shrink: 0;
}

.item-thumb {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--border, #dee2e6);
    flex-shrink: 0;
}

.item-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow: hidden;
}

.item-title {
    font-weight: 400;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--text, #1e293b);
    word-break: break-word;
}

.item-card.done .item-title {
    text-decoration: line-through;
    color: var(--muted, #94a3b8);
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    font-size: 0.70rem;
    color: var(--muted, #64748b);
}

.tag-price {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 500;
}

.tag-qty {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    padding: 1px 5px;
    border-radius: 4px;
}

.tag-reminder {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 1px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.tag-link {
    color: var(--accent, #0d6efd);
    text-decoration: none;
}
.tag-link:hover { text-decoration: underline; }

.item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Not Modu (Rich Text / Freeform) ── */
.note-editor-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.note-textarea {
    width: 100%;
    min-height: 400px;
    padding: 16px;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1px solid var(--border, #dee2e6);
    border-radius: 8px;
    resize: vertical;
    outline: none;
    line-height: 1.6;
}

.note-textarea:focus {
    border-color: var(--accent, #0d6efd);
}

/* ── Modal & Dialogs ── */
.tnote-modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.tnote-modal-backdrop.open {
    display: flex !important;
}

.tnote-modal {
    background: var(--surface, #ffffff);
    border-radius: var(--radius, 10px);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border, #dee2e6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 600;
}

.modal-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border, #dee2e6);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: var(--surface3, #f8f9fa);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text, #212529);
}

.form-control {
    font-family: var(--font-sans);
    padding: 8px 12px;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 6px;
    font-size: 0.88rem;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    border-color: var(--primary, #0284c7);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.12);
}

/* ── Finans & Düzenli Ödeme Stilleri ── */
.finance-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

.finance-kpi-card {
    background: var(--surface2, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.finance-kpi-card .kpi-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.finance-kpi-card .kpi-value {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
}

.finance-kpi-card .kpi-sub {
    font-size: 0.68rem;
    color: var(--muted, #94a3b8);
}

.kpi-income .kpi-value { color: #0f172a; }
.kpi-expense .kpi-value { color: #dc2626; }
.kpi-balance .kpi-value { color: #0284c7; }
.kpi-unpaid .kpi-value { color: #d97706; }

.finance-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--surface2, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    padding: 6px 10px;
}

.finance-period-selector {
    display: flex;
    align-items: center;
    gap: 6px;
}

.finance-period-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text, #1e293b);
    min-width: 70px;
    text-align: center;
}

.finance-table-container {
    overflow-x: auto;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    background: var(--surface, #ffffff);
}

.finance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
}

.finance-table th {
    background: var(--surface2, #f1f5f9);
    padding: 6px 8px;
    font-weight: 700;
    color: var(--muted, #475569);
    border-bottom: 1px solid var(--border, #cbd5e1);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.finance-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border, #f1f5f9);
    vertical-align: middle;
}

.finance-table tr:hover td {
    background: var(--surface2, #f8fafc);
}

.finance-table tr.row-paid td {
    opacity: 0.65;
}

.tag-due {
    background: var(--surface3, #e2e8f0);
    color: var(--text, #334155);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    white-space: nowrap;
}

.tag-income-type {
    color: var(--primary, #0284c7);
    font-weight: 700;
    font-size: 0.82rem;
}

.tag-expense-type {
    color: #dc2626;
    font-weight: 700;
    font-size: 0.82rem;
}

.btn-status-toggle {
    border: none;
    cursor: pointer;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.btn-status-toggle.is-paid {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.btn-status-toggle.is-pending {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.btn-status-toggle:hover {
    transform: scale(1.04);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border, #cbd5e1);
    color: var(--text, #334155);
}
.btn-outline:hover {
    background: var(--surface2, #f1f5f9);
}

/* ─────────────────────────────────────────────────────────────
   Proje Yönetim & Atölye / İnşa / Bilimsel Çalışma Görünümü
   ───────────────────────────────────────────────────────────── */
.project-header-card {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius, 8px);
    padding: 10px 14px;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-kpi-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.proj-kpi-pill {
    background: var(--surface2, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 16px;
    padding: 2px 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
}

.proj-kpi-pill .pill-label {
    color: var(--muted, #64748b);
    font-weight: 500;
}

.proj-kpi-pill .pill-value {
    font-weight: 700;
    color: var(--text, #1e293b);
}

.project-progress-track {
    width: 100%;
    height: 5px;
    background: var(--surface3, #e2e8f0);
    border-radius: 3px;
    overflow: hidden;
}

.project-progress-fill {
    height: 100%;
    background: var(--primary, #0284c7);
    transition: width 0.4s ease;
    border-radius: 3px;
}

/* Timeline / Zaman Çizelgesi */
.timeline-section-card {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius, 8px);
    padding: 12px 14px;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.timeline-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.timeline-scroll-container {
    overflow-x: auto;
    padding: 8px 4px 14px 4px;
    scrollbar-width: thin;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.timeline-track {
    display: inline-flex;
    align-items: flex-start;
    gap: 18px;
    position: relative;
    min-width: 100%;
    width: max-content;
    padding: 10px 14px 6px 14px;
    box-sizing: border-box;
}

.timeline-track::before {
    content: '';
    position: absolute;
    top: 23px;
    left: 24px;
    right: 24px;
    height: 3px;
    background: var(--border, #cbd5e1);
    z-index: 0;
}

.timeline-track.is-empty::before {
    display: none;
}

.timeline-node {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 150px;
    max-width: 200px;
    cursor: pointer;
    flex-shrink: 0;
    box-sizing: border-box;
}

.timeline-node-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--surface, #ffffff);
    border: 3px solid var(--muted, #94a3b8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.timeline-node.status-completed .timeline-node-circle {
    background: #0284c7;
    border-color: #0369a1;
    color: #ffffff;
}

.timeline-node.status-in_progress .timeline-node-circle {
    background: #3b82f6;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.timeline-node.status-pending .timeline-node-circle {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #64748b;
}

.timeline-node-content {
    background: var(--surface2, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.timeline-node.active .timeline-node-content {
    border-color: var(--accent, #3b82f6);
    background: #eff6ff;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
}

.timeline-node-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text, #1e293b);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.timeline-node-date {
    font-size: 0.72rem;
    color: var(--muted, #64748b);
    margin-top: 3px;
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.milestone-detail-card {
    background: var(--surface2, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 14px 18px;
    margin-top: 4px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Tabs */
.project-tabs-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.project-tab-nav {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border, #e2e8f0);
    padding-bottom: 4px;
}

.project-tab-btn {
    border: none;
    background: transparent;
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted, #64748b);
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all 0.15s ease;
}

.project-tab-btn.active {
    color: var(--accent, #3b82f6);
    background: var(--surface, #ffffff);
    box-shadow: 0 -2px 0 var(--accent, #3b82f6) inset;
}

.project-subcard {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius, 10px);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
}

.project-subcard textarea.form-control {
    font-family: var(--font-sans);
    font-size: 0.90rem;
    line-height: 1.6;
    min-height: 150px;
    resize: vertical;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text, #1e293b);
    background: var(--surface, #ffffff);
    box-sizing: border-box;
    width: 100%;
}

.project-subcard textarea.form-control:focus {
    border-color: var(--primary, #0284c7);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.12);
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.gallery-card {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface2, #f8fafc);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.gallery-thumb {
    width: 100%;
    height: 130px;
    object-fit: cover;
    background: #000;
}

.gallery-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gallery-title {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-desc {
    font-size: 0.72rem;
    color: var(--muted, #64748b);
}

/* BOM Status Badges */
.btn-bom-status {
    border: none;
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s ease;
}
.btn-bom-status:hover { transform: scale(1.04); }
.btn-bom-status.is-needed { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.btn-bom-status.is-ordered { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.btn-bom-status.is-available { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }

.bom-summary-bar {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    padding: 12px 14px;
    background: var(--surface2, #f8fafc);
    border-top: 1px solid var(--border, #e2e8f0);
    border-radius: 0 0 8px 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Log Cards */
.log-timeline-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.log-card {
    border: 1px solid var(--border, #e2e8f0);
    border-left: 4px solid var(--accent, #3b82f6);
    border-radius: 6px;
    background: var(--surface2, #f8fafc);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.log-card.type-issue { border-left-color: #ef4444; }
.log-card.type-solution { border-left-color: #0284c7; }
.log-card.type-milestone { border-left-color: #64748b; }

.log-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
}
.log-badge.type-progress { background: #e0f2fe; color: #0369a1; }
.log-badge.type-issue { background: #fee2e2; color: #b91c1c; }
.log-badge.type-solution { background: #dcfce7; color: #15803d; }
.log-badge.type-milestone { background: #fef3c7; color: #b45309; }

/* ── Genel Bakış & Özet Sayfası Stilleri ── */
.overview-welcome-card {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #dee2e6);
    border-radius: var(--radius, 10px);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: var(--shadow, 0 2px 6px rgba(0,0,0,0.04));
}

.overview-actions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.overview-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 2px;
}

@media (max-width: 900px) {
    .overview-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
}
@media (max-width: 500px) {
    .overview-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px !important;
    }
}

.overview-kpi-card {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    padding: 0 10px;
    height: 32px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    overflow: hidden;
}

.overview-kpi-card:hover {
    background: var(--surface2, #f8fafc);
    border-color: var(--primary, #0284c7);
}

.kpi-mini-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #0284c7);
    flex-shrink: 0;
}

.kpi-mini-val {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text, #1e293b);
    line-height: 1;
}

.kpi-mini-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--muted, #64748b);
    line-height: 1;
}

.kpi-mini-sub {
    font-size: 0.70rem;
    color: var(--muted, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}

.ov-progress-track {
    width: 100%;
    height: 3px;
    background: var(--surface2, #e2e8f0);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.ov-progress-fill {
    height: 100%;
    background: var(--accent, #0284c7);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* 2 Sütunlu Izgara */
.overview-grid-2col {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 8px;
}

@media (max-width: 960px) {
    .overview-grid-2col {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 600px) {
    #overview-view {
        padding: 10px 8px 24px 8px !important;
    }
    .overview-section-box {
        padding: 8px 8px;
    }
    .ov-item-row {
        gap: 4px !important;
        padding: 4px 6px !important;
    }
    .ov-item-meta .ov-page-tag {
        max-width: 75px !important;
        font-size: 0.65rem !important;
    }
}

.overview-section-box {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.section-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border, #f1f5f9);
}

.section-box-title {
    font-size: 0.80rem;
    font-weight: 600;
    color: var(--text, #1e293b);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Minimalist Kompakt Görev Satırları (Single-Line Task Rows) */
.ov-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 6px;
    border-radius: 4px;
    border-bottom: 1px solid var(--border, #f1f5f9);
    transition: background 0.15s ease;
    min-height: 28px;
}

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

.ov-item-row:hover {
    background: var(--surface2, #f8fafc);
}

.ov-item-checkbox-col {
    padding-top: 2px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ov-task-checkbox {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: var(--primary, #2563eb);
    border-radius: 4px;
}

.ov-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ov-item-title {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text, #1e293b);
    line-height: 1.35;
    word-break: break-word;
}

.ov-item-submeta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.72rem;
}

.ov-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--surface2, #f1f5f9);
    color: var(--muted, #64748b);
    font-size: 0.70rem;
    font-weight: 500;
}

.ov-meta-pill.price {
    color: #0284c7;
    font-weight: 600;
    background: #e0f2fe;
}

.empty-state-slim {
    padding: 12px 10px;
    text-align: center;
    color: var(--muted, #64748b);
    font-size: 0.80rem;
    border-radius: 6px;
    background: var(--surface2, #f8fafc);
    border: 1px dashed var(--border, #e2e8f0);
}

.ov-page-tag {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--surface2, #e2e8f0);
    color: var(--muted, #475569);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.ov-page-tag:hover {
    background: #eff6ff;
    color: var(--primary, #2563eb);
}

.ov-bill-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 6px;
    border-bottom: 1px solid var(--surface2, #f8fafc);
    cursor: pointer;
    transition: background 0.15s ease;
}
.ov-bill-row:last-child { border-bottom: none; }
.ov-bill-row:hover {
    background: var(--surface2, #f8fafc);
}
.ov-bill-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.ov-bill-day {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: #fee2e2;
    color: #dc2626;
    flex-shrink: 0;
}
.ov-bill-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text, #334155);
}
.ov-bill-amount {
    font-size: 0.82rem;
    font-weight: 700;
    color: #dc2626;
}

.ov-project-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border-radius: 6px;
    border-bottom: 1px solid var(--surface2, #f8fafc);
    cursor: pointer;
    transition: background 0.15s ease;
}
.ov-project-row:last-child { border-bottom: none; }
.ov-project-row:hover {
    background: var(--surface2, #f8fafc);
}
.ov-proj-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ov-proj-title {
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ov-proj-pct {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--accent, #0284c7);
}

.ov-recent-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 6px;
    border-bottom: 1px solid var(--surface2, #f8fafc);
    cursor: pointer;
    transition: background 0.15s ease;
}
.ov-recent-row:last-child { border-bottom: none; }
.ov-recent-row:hover {
    background: var(--surface2, #f8fafc);
}
.ov-recent-left {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1;
}
.ov-recent-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text, #334155);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ov-recent-badge {
    font-size: 0.70rem;
    color: var(--muted, #94a3b8);
}

/* ─────────────────────────────────────────────────────────────
   Global Spotlight Search (Ctrl + K)
   ───────────────────────────────────────────────────────────── */
.global-search-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface2, #f1f5f9);
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 6px;
    padding: 3px 8px;
    height: 28px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin: 0 4px;
    max-width: 200px;
    flex: 1;
}
.global-search-trigger:hover {
    border-color: var(--accent, #3b82f6);
    background: var(--surface, #ffffff);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.search-trigger-icon { font-size: 0.82rem; color: var(--muted, #94a3b8); }
.search-trigger-text { font-size: 0.78rem; color: var(--muted, #64748b); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-trigger-kbd {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 4px;
    font-size: 0.62rem;
    font-family: inherit;
    padding: 1px 4px;
    color: var(--muted, #64748b);
    font-weight: 500;
}

@media (max-width: 600px) {
    .global-search-trigger {
        margin: 0;
        max-width: 120px;
        padding: 2px 6px;
    }
    .search-trigger-kbd {
        display: none !important;
    }
}
@media (max-width: 480px) {
    .global-search-trigger {
        max-width: 28px;
        height: 28px;
        padding: 0;
        justify-content: center;
    }
    .search-trigger-text {
        display: none !important;
    }
}

.spotlight-modal {
    max-width: 600px;
    width: 92vw;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.spotlight-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border, #e2e8f0);
    background: var(--surface, #ffffff);
}
.spotlight-search-icon { font-size: 1.2rem; }
.spotlight-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text, #1e293b);
    outline: none;
}
.spotlight-filter-tabs {
    display: flex;
    gap: 6px;
    padding: 8px 16px;
    background: var(--surface2, #f8fafc);
    border-bottom: 1px solid var(--border, #e2e8f0);
    overflow-x: auto;
}
.spotlight-tab {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 3px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--muted, #64748b);
    transition: all 0.15s;
    white-space: nowrap;
}
.spotlight-tab:hover { background: var(--surface3, #e2e8f0); }
.spotlight-tab.active {
    background: var(--accent, #3b82f6);
    color: #fff;
    font-weight: 600;
}
.spotlight-results {
    max-height: 380px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.spotlight-hint {
    padding: 24px 16px;
    text-align: center;
    color: var(--muted, #94a3b8);
    font-size: 0.82rem;
}
.spotlight-group-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted, #94a3b8);
    padding: 6px 8px 2px 8px;
    letter-spacing: 0.5px;
}
.spotlight-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s ease;
}
.spotlight-row:hover, .spotlight-row.selected {
    background: #eff6ff;
}
.spotlight-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.spotlight-row-icon { font-size: 1.1rem; flex-shrink: 0; }
.spotlight-row-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.spotlight-row-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.spotlight-row-sub {
    font-size: 0.72rem;
    color: var(--muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.spotlight-badge {
    font-size: 0.70rem;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--surface3, #e2e8f0);
    color: var(--muted, #475569);
    font-weight: 600;
}
.spotlight-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 6px 16px;
    background: var(--surface2, #f8fafc);
    border-top: 1px solid var(--border, #e2e8f0);
    font-size: 0.70rem;
    color: var(--muted, #94a3b8);
}
.spotlight-footer kbd {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 3px;
    padding: 1px 4px;
    font-family: inherit;
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────
   Şifreler & Kimlik Bilgileri Kasası (Vault)
   ───────────────────────────────────────────────────────────── */
.vault-top-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(49, 46, 129, 0.2);
}
.vault-banner-info div:first-child { color: #ffffff !important; }
.vault-banner-info div:last-child { color: #cbd5e1 !important; }
.vault-banner-actions { display: flex; gap: 8px; }

.vault-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
}
.vault-scope-tabs {
    display: flex;
    gap: 4px;
    background: var(--surface2, #f1f5f9);
    padding: 3px;
    border-radius: 8px;
}
.vault-tab-btn {
    border: none;
    background: transparent;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.80rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--muted, #64748b);
    transition: all 0.15s;
}
.vault-tab-btn.active {
    background: var(--surface, #ffffff);
    color: var(--accent, #3b82f6);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.vault-filter-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vault-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}
.vault-card {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.vault-card:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.vault-card.is-favorite {
    border-color: #fde047;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 40px);
}
.vault-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.vault-card-title-area {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}
.vault-card-icon {
    font-size: 1.25rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface2, #f1f5f9);
    flex-shrink: 0;
}
.vault-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vault-card-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.vault-badge {
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 600;
}
.vault-badge-scope-personal { background: #e0f2fe; color: #0369a1; }
.vault-badge-scope-family { background: #fce7f3; color: #be185d; }
.vault-badge-scope-work { background: #fef3c7; color: #b45309; }
.vault-badge-profile { background: #f3e8ff; color: #6b21a8; }
.vault-badge-cat { background: var(--surface2, #f1f5f9); color: var(--muted, #475569); }

.vault-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface2, #f8fafc);
    border: 1px solid var(--border, #f1f5f9);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.82rem;
}
.vault-field-label {
    font-size: 0.70rem;
    color: var(--muted, #94a3b8);
    font-weight: 600;
    text-transform: uppercase;
}
.vault-field-val {
    font-family: monospace;
    font-weight: 600;
    color: var(--text, #1e293b);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 170px;
}
.vault-field-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.vault-btn-copy {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 5px;
    border-radius: 4px;
    transition: background 0.1s;
}
.vault-btn-copy:hover { background: var(--surface3, #e2e8f0); }

.vault-card-notes {
    font-size: 0.75rem;
    color: var(--muted, #64748b);
    background: var(--surface3, #f8fafc);
    border-radius: 6px;
    padding: 6px 8px;
    white-space: pre-wrap;
    line-height: 1.35;
}
.vault-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border, #f1f5f9);
    padding-top: 8px;
    font-size: 0.75rem;
}

/* ── Kasa Klasörleri & Proje Şeridi ── */
.vault-folders-container {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.vault-folders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vault-folders-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}
.vault-folder-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--surface2, #f1f5f9);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text, #1e293b);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    user-select: none;
}
.vault-folder-chip:hover {
    background: var(--surface3, #e2e8f0);
    border-color: #93c5fd;
}
.vault-folder-chip.active {
    background: var(--accent, #3b82f6);
    color: #ffffff;
    border-color: var(--accent, #3b82f6);
}
.vault-folder-chip.active .vault-folder-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}
.vault-folder-count {
    font-size: 0.68rem;
    background: var(--surface3, #e2e8f0);
    color: var(--muted, #64748b);
    padding: 1px 6px;
    border-radius: 10px;
}

/* ── Aktif Filtre Çubuğu ── */
.vault-active-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    color: #1e40af;
    animation: fadeIn 0.2s ease;
}
.vault-active-filter-clear {
    background: transparent;
    border: 1px solid #93c5fd;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.12s;
}
.vault-active-filter-clear:hover {
    background: #dbeafe;
}

/* ── Tıklanabilir Rozetler & İlgili Şifre Bağlantıları ── */
.vault-badge-clickable {
    cursor: pointer;
    transition: transform 0.12s, filter 0.12s;
}
.vault-badge-clickable:hover {
    filter: brightness(0.92);
    transform: scale(1.04);
}
.vault-badge-folder { background: #e0e7ff; color: #3730a3; }
.vault-badge-tag { background: var(--surface2, #f1f5f9); color: #475569; border: 1px dashed #cbd5e1; }

.vault-related-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent, #3b82f6);
    cursor: pointer;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.08);
    transition: background 0.15s;
    border: none;
}
.vault-related-link:hover {
    background: rgba(59, 130, 246, 0.18);
}
.vault-related-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--surface2, #f8fafc);
    border-radius: 6px;
    border: 1px solid var(--border, #f1f5f9);
    transition: border-color 0.15s;
}
.vault-related-row:hover {
    border-color: #93c5fd;
}

/* ─────────────────────────────────────────────────────────────
   Çöp Kutusu (Trash)
   ───────────────────────────────────────────────────────────── */
.trash-top-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 10px;
}
.trash-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.trash-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.15s;
}
.trash-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

/* ─────────────────────────────────────────────────────────────
   İşlem Geçmişi (Action Timeline)
   ───────────────────────────────────────────────────────────── */
.history-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #f1f5f9);
    border-radius: 6px;
    transition: background 0.1s;
}
.history-item-row:hover {
    background: var(--surface2, #f8fafc);
}
.history-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}
.history-desc {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.history-time {
    font-size: 0.70rem;
    color: var(--muted, #94a3b8);
    white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────
   Modern Aksiyon Menüsü (Action Dropdown) & Başlık
   ───────────────────────────────────────────────────────────── */
.header-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
}

.action-dropdown-container {
    position: relative;
    display: inline-block;
}

.btn-more-actions {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border, #cbd5e1);
    background: var(--surface2, #f8fafc);
    color: var(--text, #334155);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-more-actions:hover {
    background: var(--surface3, #e2e8f0);
    border-color: var(--accent, #3b82f6);
}

.action-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 220px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text, #1e293b);
    cursor: pointer;
    user-select: none;
    transition: background 0.12s;
}

.dropdown-item:hover {
    background: var(--surface2, #f1f5f9);
}

.dropdown-item.text-danger {
    color: var(--danger, #ef4444);
}

.dropdown-item.text-danger:hover {
    background: #fef2f2;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Home Assistant Lovelace Dashboard Stili Dinamik Sekmeler
   ───────────────────────────────────────────────────────────────────────────── */
.page-type-tabs.lovelace-tabs-bar,
.page-type-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 100%;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: none;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.page-type-tabs::-webkit-scrollbar {
    display: none;
}
.page-type-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--muted, #64748b);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    position: relative;
    user-select: none;
}
.page-type-tab-btn:hover {
    color: var(--text, #0f172a);
    background: var(--surface2, #f1f5f9);
}
.page-type-tab-btn.active {
    color: var(--primary, #0284c7);
    background: var(--primary-light, #f0f9ff);
    border-color: rgba(2, 132, 199, 0.22);
    font-weight: 600;
}
.page-type-tab-btn .tab-icon {
    font-size: 0.95rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}
.page-type-tab-btn .tab-title-text {
    font-size: 0.84rem;
    line-height: 1;
}
.page-type-tab-btn .tab-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 0.7rem;
    line-height: 1;
    color: var(--muted, #64748b);
    opacity: 0.5;
    margin-left: 2px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s;
}
.page-type-tab-btn:hover .tab-close-btn {
    opacity: 0.85;
}
.page-type-tab-btn .tab-close-btn:hover {
    opacity: 1;
    color: var(--danger, #ef4444);
    background: rgba(239, 68, 68, 0.12);
}
.page-tab-add-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
}
.page-tab-add-btn.lovelace-add-btn,
.page-tab-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted, #64748b);
    background: transparent;
    border: 1px dashed var(--border, #cbd5e1);
    cursor: pointer;
    transition: all 0.15s ease;
}
.page-tab-add-btn:hover {
    color: var(--primary, #0284c7);
    border-color: var(--primary, #0284c7);
    background: var(--primary-light, #f0f9ff);
}

.dropdown-item-icon {
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background: var(--border, #e2e8f0);
    margin: 4px 0;
}


/* ─────────────────────────────────────────────────────────────
   Modern Markdown Not Editörü
   ───────────────────────────────────────────────────────────── */
.note-editor-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

.note-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border, #f1f5f9);
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.note-toolbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-tb {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted, #64748b);
    cursor: pointer;
    transition: all 0.12s;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-tb:hover {
    background: var(--surface2, #f1f5f9);
    border-color: var(--border, #e2e8f0);
    color: var(--text, #0f172a);
}

.tb-divider {
    width: 1px;
    height: 18px;
    background: var(--border, #cbd5e1);
    margin: 0 4px;
}

.btn-group-segmented {
    display: inline-flex;
    background: var(--surface2, #f1f5f9);
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.btn-seg {
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted, #64748b);
    cursor: pointer;
    transition: all 0.12s;
}

.btn-seg.active {
    background: var(--surface, #ffffff);
    color: var(--text, #0f172a);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.note-save-status {
    font-size: 0.75rem;
    color: var(--muted, #94a3b8);
    font-weight: 500;
    margin-right: 4px;
}

.note-textarea {
    width: 100%;
    min-height: 280px;
    border: none;
    outline: none;
    resize: vertical;
    font-family: 'Consolas', 'Fira Code', 'Segoe UI', monospace;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text, #1e293b);
    background: transparent;
    padding: 8px 4px;
    box-sizing: border-box;
}

.note-markdown-preview {
    min-height: 280px;
    padding: 8px 6px;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text, #1e293b);
    overflow-y: auto;
}

.md-rendered-body h1, .md-h1, .md-rendered-body h2, .md-h2 { font-size: 1.15rem; font-weight: 600; margin: 14px 0 6px 0; border-bottom: 1px solid var(--border, #e2e8f0); padding-bottom: 4px; }
.md-rendered-body h3, .md-h3 { font-size: 0.92rem; font-weight: 600; margin: 10px 0 3px 0; }
.md-rendered-body p { margin: 5px 0; font-size: 0.92rem; }
.md-rendered-body ul { padding-left: 18px; margin: 5px 0; }
.md-li { margin: 2px 0; }
.md-quote { border-left: 3px solid var(--accent, #3b82f6); padding-left: 10px; margin: 6px 0; color: var(--muted, #64748b); font-style: italic; }
.md-inline-code { background: var(--surface2, #f1f5f9); padding: 2px 5px; border-radius: 4px; font-family: monospace; font-size: 0.85em; color: #e11d48; }
.md-code-block { background: #0f172a; color: #f8fafc; padding: 10px 12px; border-radius: 6px; font-family: monospace; font-size: 0.82rem; overflow-x: auto; margin: 8px 0; }

/* ── Not Tablosu (Responsive Table) ── */
.note-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 14px 0;
    border-radius: 8px;
    border: 1px solid var(--border, #cbd5e1);
    background: var(--surface, #ffffff);
}
.note-table {
    width: 100%;
    min-width: 360px;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}
.note-table th {
    background: var(--surface2, #f8fafc);
    color: var(--text, #0f172a);
    font-weight: 600;
    padding: 8px 12px;
    border: 1px solid var(--border, #e2e8f0);
}
.note-table td {
    padding: 8px 12px;
    border: 1px solid var(--border, #e2e8f0);
    color: var(--text, #1e293b);
    vertical-align: top;
}
.note-table tr:hover td {
    background: rgba(2, 132, 199, 0.02);
}

/* ── Vurgu & Uyarı Kutuları (Callouts) ── */
.note-callout {
    padding: 10px 14px;
    border-radius: 8px;
    margin: 12px 0;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.88rem;
    line-height: 1.5;
    border-left: 4px solid;
}
.note-callout-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
    line-height: 1.2;
}
.note-callout-body {
    flex: 1;
    min-width: 0;
}
.note-callout-info {
    background: #f0f9ff;
    border-left-color: #0284c7;
    color: #0c4a6e;
}
.note-callout-warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
    color: #78350f;
}
.note-callout-tip {
    background: #f0fdf4;
    border-left-color: #10b981;
    color: #064e3b;
}
.note-callout-danger {
    background: #fef2f2;
    border-left-color: #ef4444;
    color: #7f1d1d;
}

/* ── Zengin Metin İşaretçi & Vurgulama ── */
.note-rich-editor mark, .note-highlight {
    background-color: #fef08a;
    color: inherit;
    padding: 1px 4px;
    border-radius: 3px;
}

/* ── Not Araç Çubuğu Açılır Menüleri (Dropdowns) ── */
.note-dropdown-popup {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    z-index: 1050;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    padding: 4px;
    display: flex;
    flex-direction: column;
    min-width: 160px;
    font-size: 0.82rem;
}
.note-dropdown-popup .dropdown-item {
    padding: 7px 10px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--text, #1e293b);
    transition: background 0.12s;
    white-space: nowrap;
}
.note-dropdown-popup .dropdown-item:hover {
    background: var(--surface2, #f1f5f9);
}
.md-task-item { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.md-link { color: var(--accent, #2563eb); text-decoration: underline; }

.note-footer-bar {
    display: flex;
    justify-content: flex-end;
    padding-top: 6px;
    border-top: 1px solid var(--border, #f1f5f9);
}

/* ── Mobil Ekran İyileştirmeleri (Kompakt ve Düşük Boşluk) ── */
@media (max-width: 768px) {
    body:has(.tnote-container) .main-content,
    .main-content:has(.tnote-container) {
        padding: 6px 6px !important;
    }
    .content-header {
        flex-wrap: nowrap;
        gap: 6px;
    }
    .content-title-area {
        min-width: 0;
        flex: 1;
        gap: 6px;
    }
    .content-title {
        font-size: 1.05rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .header-add-btn {
        padding: 3px 8px !important;
        font-size: 0.76rem !important;
        height: 28px;
    }
    .header-add-btn span {
        white-space: nowrap;
    }
    .btn-more-actions {
        width: 28px;
        height: 28px;
    }
    .quick-add-box {
        padding: 3px 6px;
    }
    .quick-input {
        font-size: 0.78rem;
        height: 28px;
    }
    .item-card {
        padding: 4px 8px;
        min-height: 36px;
    }
    .note-toolbar {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 6px;
        gap: 6px;
    }
    .note-toolbar::-webkit-scrollbar {
        display: none;
    }
    .note-toolbar-group {
        flex-shrink: 0;
    }
    .item-title {
        font-size: 0.80rem;
    }
    .overview-actions-bar {
        gap: 4px;
    }
    .overview-actions-bar .btn {
        padding: 4px 8px;
        font-size: 0.75rem;
        min-height: 32px;
    }
    .btn-icon, .btn-icon-subtle {
        min-width: 32px;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .cat-divider-del-btn {
        opacity: 0.8 !important;
        width: 28px !important;
        height: 28px !important;
    }
    .category-header {
        padding: 7px 6px !important;
        min-height: 36px;
    }
    .page-item {
        padding: 7px 8px !important;
        min-height: 36px;
    }
}

/* ─────────────────────────────────────────────────────────────
   Modern Sidebar Footer Dock (Kurumsal Alt Panel)
   ───────────────────────────────────────────────────────────── */
.sidebar-footer {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border, #e2e8f0);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-footer-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
    width: 100%;
}

.sidebar-footer-tools {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 6px;
    padding: 2px 4px;
}

.footer-tool-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm, 6px);
    color: var(--text-secondary, #475569);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    position: relative;
}

.footer-tool-btn:hover {
    background: var(--surface2, #f1f5f9);
    color: var(--accent, #0284c7);
    border-color: var(--border, #e2e8f0);
}

.footer-tool-btn.active {
    background: #e0f2fe;
    color: var(--accent, #0284c7);
    font-weight: 600;
}

.footer-tool-btn .svg-icon {
    width: 18px;
    height: 18px;
}

.footer-tool-btn #sidebar-trash-badge,
.footer-tool-btn .badge-count {
    position: absolute;
    top: 4px;
    right: calc(50% - 16px);
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--danger, #ef4444);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 1.5px solid var(--surface, #ffffff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 2;
}

.sidebar-footer-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    background: var(--surface2, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius-sm, 6px);
    gap: 6px;
}

.profile-left {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    min-width: 0;
    flex: 1;
}

.profile-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e0f2fe;
    color: var(--accent, #0284c7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    line-height: 1.2;
}

.profile-name {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-bot-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.63rem;
    color: var(--muted, #64748b);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.status-dot.offline {
    background: #94a3b8;
}

.profile-action-btn {
    padding: 3px 5px;
    color: var(--muted, #64748b);
    border-radius: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
}
.profile-action-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Modern Empty State (Onay tikli gri kutular yerine şık ve davetkar durumlar) */
.empty-state-modern {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--muted, #64748b);
    text-align: center;
}

.empty-state-icon {
    width: 22px;
    height: 22px;
    color: #94a3b8;
}

.empty-state-text {
    font-size: 0.80rem;
    color: var(--muted, #64748b);
}

.empty-state-action {
    margin-top: 4px;
    font-size: 0.74rem;
    padding: 3px 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 6px;
    border: 1px solid var(--border, #cbd5e1);
    background: #ffffff;
    color: var(--text, #0f172a);
    cursor: pointer;
    font-weight: 500;
}
.empty-state-action:hover {
    border-color: var(--accent, #0284c7);
    color: var(--accent, #0284c7);
    background: #f0f9ff;
}

/* Quick Notes Scratchpad on Overview */
.ov-quicknote-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 5px 8px;
    background: var(--surface2, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    font-size: 0.78rem;
    color: var(--text, #0f172a);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.ov-quicknote-row:hover {
    background: #f0f9ff;
    border-color: #bae6fd;
}
.ov-quicknote-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ov-quicknote-del {
    color: var(--muted, #94a3b8);
    cursor: pointer;
    padding: 1px 4px;
    border: none;
    background: transparent;
    border-radius: 4px;
}
.ov-quicknote-del:hover {
    color: #dc2626;
    background: #fee2e2;
}

/* Category Color Indicator Dot */
.cat-color-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
    flex-shrink: 0;
}

/* Visual Emoji Picker Grid */
.emoji-picker-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 3px;
    margin-top: 6px;
    max-height: 110px;
    overflow-y: auto;
    padding: 6px;
    background: var(--surface2, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
}
.emoji-btn {
    font-size: 1.15rem;
    height: 30px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
    user-select: none;
}
.emoji-btn:hover {
    background: #e2e8f0;
    border-color: var(--border, #cbd5e1);
    transform: scale(1.15);
}
.emoji-btn.active {
    background: #e0f2fe;
    border-color: #0284c7;
}

/* Color Swatches Palette */
.color-picker-palette .color-swatch {
    transition: transform 0.12s, box-shadow 0.12s;
}
.color-picker-palette .color-swatch:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--accent, #0284c7);
}

/* AI Header & Quick Actions */
.header-ai-btn {
    border-color: #0284c7;
    color: #0284c7;
    font-weight: 600;
}
.header-ai-btn:hover {
    background: #f0f9ff;
}
.ai-quick-action-btn {
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border, #cbd5e1);
    background: var(--surface, #ffffff);
    transition: all 0.15s;
}
.ai-quick-action-btn:hover {
    border-color: var(--accent, #0284c7);
    color: var(--accent, #0284c7);
    background: #f0f9ff;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Zengin Metin WYSIWYG Editörü (Gerçek Kalın, İtalik, Başlık ve Listeler)
   ───────────────────────────────────────────────────────────────────────────── */
.note-rich-editor {
    min-height: 480px;
    padding: 8px 0;
    background: transparent;
    color: var(--text, #0f172a);
    font-size: 0.92rem;
    line-height: 1.65;
    outline: none;
    border: none;
    border-radius: 0;
    overflow-y: visible;
    font-family: inherit;
    box-sizing: border-box;
}

.note-rich-editor:focus {
    border: none;
    box-shadow: none;
    outline: none;
}

.note-rich-editor:empty:before {
    content: attr(placeholder);
    color: var(--muted, #94a3b8);
    pointer-events: none;
    display: block;
}

/* 1. KADEME BAŞLIK: 1.15rem (~18px) Semibold — Sayfa Başlığı ile Birebir Eşit */
.note-rich-editor h1,
.note-rich-editor h2 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.4;
    margin-top: 20px;
    margin-bottom: 8px;
    color: var(--text, #0f172a);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding-bottom: 4px;
}

/* 2. KADEME ALT BAŞLIK: 0.92rem (~15px) Semibold — Metin Boyu ile Eşit Kalın */
.note-rich-editor h3,
.note-rich-editor h4 {
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.5;
    margin-top: 14px;
    margin-bottom: 4px;
    color: var(--text, #0f172a);
}

.note-rich-editor b, .note-rich-editor strong {
    font-weight: 700;
    color: var(--text, #0f172a);
}

.note-rich-editor i, .note-rich-editor em {
    font-style: italic;
}

.note-rich-editor u {
    text-decoration: underline;
}

.note-rich-editor s {
    text-decoration: line-through;
    opacity: 0.7;
}

.note-rich-editor ul, .note-rich-editor ol {
    margin-left: 24px;
    margin-bottom: 10px;
}

.note-rich-editor li {
    margin-bottom: 4px;
}

.note-rich-editor blockquote {
    border-left: 3.5px solid var(--accent, #0284c7);
    margin: 10px 0;
    padding: 6px 14px;
    color: var(--muted, #475569);
    background: rgba(2, 132, 199, 0.04);
    border-radius: 0 6px 6px 0;
}

.note-rich-editor hr {
    border: none;
    height: 1px;
    background: var(--border, #e2e8f0);
    margin: 18px 0;
}

.note-rich-editor code {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.88em;
    color: #dc2626;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Geri Al (Undo / Ctrl+Z) Yüzen Bildirim Çubuğu
   ───────────────────────────────────────────────────────────────────────────── */
.undo-toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #f8fafc;
    padding: 10px 18px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    z-index: 99999;
    font-size: 0.86rem;
    animation: slideUpUndoToast 0.22s ease-out;
}

@keyframes slideUpUndoToast {
    from { transform: translate(-50%, 30px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.undo-toast-btn {
    background: #38bdf8;
    color: #0f172a;
    border: none;
    border-radius: 20px;
    padding: 4px 12px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
}

.undo-toast-btn:hover {
    background: #7dd3fc;
}

/* ─────────────────────────────────────────────────────────────────────────────
   PDF & Yazdırma Stilleri (@media print)
   ───────────────────────────────────────────────────────────────────────────── */
@media print {
    .sidebar, .top-bar, .header-actions, .note-toolbar, .quick-add-box,
    .modal-overlay, .undo-toast-container, .btn, .btn-icon, .btn-icon-subtle,
    .action-dropdown-container, .spotlight-search-modal, #page-more-dropdown {
        display: none !important;
    }

    body, html, .app-layout, .main-panel, .content-area {
        background: #ffffff !important;
        color: #000000 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    .page-header {
        border: none !important;
        border-bottom: 2px solid #000000 !important;
        padding-bottom: 12px !important;
        margin-bottom: 24px !important;
    }

    .note-rich-editor, .checklist-items-wrap {
        border: none !important;
        box-shadow: none !important;
        font-size: 12pt !important;
        line-height: 1.6 !important;
        color: #111111 !important;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Power Packs: Toggle Blocks, Ekler, Yer İmleri, Kilit ve Graf Stilleri
   ───────────────────────────────────────────────────────────────────────────── */
details.note-toggle {
    background: var(--surface2, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 8px 0;
    transition: all 0.2s ease;
}
details.note-toggle[open] {
    background: var(--surface, #ffffff);
    border-color: var(--primary, #3b82f6);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
details.note-toggle summary {
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    user-select: none;
    color: var(--text, #1e293b);
    outline: none;
    list-style-type: '▶ ';
}
details.note-toggle[open] summary {
    list-style-type: '▼ ';
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border, #e2e8f0);
    padding-bottom: 6px;
    color: var(--primary, #3b82f6);
}

.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface2, #f1f5f9);
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text, #334155);
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}
.attachment-chip:hover {
    background: var(--surface, #ffffff);
    border-color: var(--primary, #3b82f6);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
.attachment-chip .att-del-btn {
    opacity: 0.5;
    transition: opacity 0.15s;
    cursor: pointer;
}
.attachment-chip:hover .att-del-btn {
    opacity: 1;
    color: var(--danger, #ef4444);
}

/* Zengin Web & X (Twitter) Yer İmi Kartı */
.bookmark-card {
    display: flex;
    gap: 12px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
    text-decoration: none;
    color: var(--text, #1e293b);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: transform 0.15s, box-shadow 0.15s;
}
.bookmark-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--primary, #3b82f6);
}
.bookmark-card-thumb {
    width: 140px;
    min-width: 140px;
    height: 100px;
    background-size: cover;
    background-position: center;
    background-color: var(--surface2, #f8fafc);
}
.bookmark-card-info {
    padding: 8px 12px 8px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}
.bookmark-card-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.bookmark-card-desc {
    font-size: 0.78rem;
    color: var(--muted, #64748b);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}
.bookmark-card-source {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary, #3b82f6);
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-item-pinned-badge {
    font-size: 0.75rem;
    color: var(--warning, #f59e0b);
    margin-left: 4px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Apple HIG & Segmented Control & Typography Scaling
   ───────────────────────────────────────────────────────────────────────────── */
:root {
    --apple-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --radius-apple: 8px;
}

body, .tnote-container, input, textarea, select, button {
    font-family: var(--apple-font) !important;
}

/* Tipografi Hiyerarşisi — Sol Menü Kompaktlığıyla Eşitleme */
.page-title-text, .category-title-text {
    font-size: 0.82rem;
    font-weight: 500;
}
.content-header h2, .page-header-title {
    font-size: 1.05rem !important; /* ~16px */
    font-weight: 600 !important;
    letter-spacing: -0.01em;
}
.section-box-title, .h4-sub-title {
    font-size: 0.85rem !important; /* ~13.5px */
    font-weight: 600 !important;
}

/* Butonlar: Apple Ghost & Subtle Zarafeti */
.btn {
    border-radius: var(--radius-apple, 8px) !important;
    font-size: 0.78rem !important; /* ~12.5px */
    font-weight: 500 !important;
    transition: all 0.15s ease !important;
}
.btn-tb {
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    font-size: 0.82rem !important;
    transition: all 0.12s ease !important;
}
.btn-tb:hover {
    background: var(--surface2, #f1f5f9) !important;
    color: var(--text, #0f172a) !important;
}

/* Inline Düzenleme Input'u */
.inline-rename-input {
    border: 1.5px solid var(--primary, #0284c7) !important;
    outline: none !important;
    border-radius: 4px !important;
    padding: 1px 6px !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    background: var(--surface, #ffffff) !important;
    color: var(--text, #0f172a) !important;
    width: 90% !important;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15) !important;
}

/* Resim Ekleme (Not Alanı İçi) */
.note-rich-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: inline-block;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.note-rich-editor img:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

/* ─────────────────────────────────────────────────────────────────────────────
   📊 Tablo / Mini Sheet Stilleri (Apple Numbers Stili)
   ───────────────────────────────────────────────────────────────────────────── */
.sheet-container {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.sheet-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.80rem;
    color: var(--text, #0f172a);
}
.sheet-table th {
    background: var(--surface2, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    padding: 6px 10px;
    font-weight: 600;
    color: var(--muted, #475569);
    text-align: left;
    white-space: nowrap;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 10;
}
.sheet-table td {
    border: 1px solid var(--border, #e2e8f0);
    padding: 5px 8px;
    background: var(--surface, #ffffff);
    min-width: 80px;
    max-width: 280px;
    outline: none;
    transition: background 0.1s ease;
}
.sheet-table td:focus {
    background: #f0f9ff;
    box-shadow: inset 0 0 0 2px var(--primary, #0284c7);
}
.sheet-table tr.sheet-sum-tr td {
    background: var(--surface2, #f8fafc);
    font-weight: 700;
    border-top: 2px solid var(--border, #cbd5e1);
}
.sheet-row-num {
    background: var(--surface2, #f1f5f9) !important;
    color: var(--muted, #94a3b8);
    font-weight: 600;
    text-align: center;
    width: 36px;
    user-select: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   🎨 Katmanlı Tuval & Çizim Stilleri (Virtual Graph Paper + Sketchpad)
   ───────────────────────────────────────────────────────────────────────────── */
.canvas-bg-btn, .canvas-tool-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted, #64748b);
    transition: all 0.12s ease;
}
.canvas-bg-btn:hover, .canvas-tool-btn:hover {
    background: var(--surface2, #f1f5f9);
    color: var(--text, #0f172a);
}
.canvas-bg-btn.active, .canvas-tool-btn.active {
    background: var(--surface, #ffffff);
    color: var(--primary, #0284c7);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.06);
}
.canvas-color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-block;
    border: 1.5px solid transparent;
    transition: transform 0.12s ease;
}
.canvas-color-swatch:hover {
    transform: scale(1.15);
}
.canvas-color-swatch.active {
    outline: 2px solid var(--primary, #0284c7);
    outline-offset: 1px;
}
.canvas-layer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 6px;
    background: var(--surface2, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    font-size: 0.75rem;
    transition: all 0.12s ease;
}
.canvas-layer-row.active {
    background: #f0f9ff;
    border-color: rgba(2, 132, 199, 0.3);
}
.canvas-layer-row .layer-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

#canvas-stage-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: #ffffff;
    overflow: hidden;
    touch-action: none;
    overscroll-behavior: contain;
    cursor: crosshair;
}
#canvas-viewport {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    will-change: transform;
    background: #ffffff;
}

/* Chrome Canvas Inspired Features: Fullscreen & Brush Preview */
#canvas-view.canvas-fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    background: var(--bg, #f8fafc) !important;
    padding: 8px 12px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
}

#canvas-view.canvas-fullscreen-mode #canvas-stage-container {
    height: calc(100vh - 58px) !important;
    flex: 1 1 auto !important;
}

#canvas-brush-preview {
    transition: transform 0.12s ease;
}
#canvas-brush-preview:hover {
    transform: scale(1.08);
}

/* ==========================================================================
   TAKVİM & AJANDA (CALENDAR & AGENDA)
   Apple Calendar / Databank Clean Iconographic Style
   ========================================================================== */

.calendar-workspace {
    display: flex;
    gap: 16px;
    height: 100%;
    min-height: 550px;
}

.calendar-sidebar-panel {
    width: 250px;
    min-width: 230px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 14px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

/* Mini Ay Takvimi */
.cal-mini-month-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
}

.cal-mini-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.cal-mini-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
}

.cal-mini-nav-btns {
    display: flex;
    gap: 2px;
}

.cal-mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.cal-mini-day-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--muted);
    padding: 2px 0;
}

.cal-mini-day {
    font-size: 0.72rem;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    user-select: none;
    color: var(--text);
}

.cal-mini-day:hover {
    background: var(--subtle-bg, rgba(0,0,0,0.05));
}

.cal-mini-day.other-month {
    color: var(--muted);
    opacity: 0.4;
}

.cal-mini-day.today {
    font-weight: 700;
    color: var(--primary);
}

.cal-mini-day.selected {
    background: var(--primary) !important;
    color: #fff !important;
    font-weight: 600;
}

.cal-mini-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
}

/* Kanallar Bölümü */
.cal-channels-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cal-channels-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px;
}

.cal-channels-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cal-channel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.12s ease;
    user-select: none;
}

.cal-channel-item:hover {
    background: var(--subtle-bg, rgba(0,0,0,0.04));
}

.cal-channel-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.cal-channel-checkbox {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    cursor: pointer;
    accent-color: var(--primary);
}

.cal-channel-icon {
    font-size: 0.85rem;
}

.cal-channel-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-channel-count {
    font-size: 0.68rem;
    color: var(--muted);
    font-weight: 600;
}

/* Ana Sahne */
.calendar-main-stage {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.cal-stage-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.cal-stage-nav-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cal-nav-arrows {
    display: flex;
    align-items: center;
    gap: 2px;
}

.cal-stage-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.cal-view-segmented-tabs {
    display: inline-flex;
    background: var(--subtle-bg, rgba(0,0,0,0.05));
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
    border: 1px solid var(--border);
}

.cal-view-tab-btn {
    border: none;
    background: transparent;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.cal-view-tab-btn:hover {
    color: var(--text);
}

.cal-view-tab-btn.active {
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.cal-views-viewport {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.cal-mode-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Ay Görünümü */
.cal-month-table-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--muted);
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 5;
}

.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(100px, 1fr);
    flex: 1;
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.cal-month-cell {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: background 0.1s ease;
}

.cal-month-cell:hover {
    background: var(--subtle-bg, rgba(0,0,0,0.02));
}

.cal-month-cell.other-month {
    opacity: 0.42;
    background: var(--subtle-bg, rgba(0,0,0,0.015));
}

.cal-month-cell.is-today {
    background: rgba(2, 132, 199, 0.04);
}

.cal-cell-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.cal-day-num {
    font-size: 0.75rem;
    font-weight: 600;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text);
}

.cal-month-cell.is-today .cal-day-num {
    background: var(--primary);
    color: #fff;
}

.cal-cell-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    padding: 1px 4px;
    border-radius: 4px;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-cell-events-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow: hidden;
}

.cal-event-pill {
    font-size: 0.71rem;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
    font-weight: 500;
    transition: transform 0.1s ease, filter 0.1s ease;
    border-left: 3px solid transparent;
}

.cal-event-pill:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

.cal-event-pill-time {
    font-size: 0.65rem;
    font-weight: 700;
    opacity: 0.85;
}

.cal-event-more {
    font-size: 0.67rem;
    color: var(--muted);
    font-weight: 600;
    padding: 1px 4px;
    cursor: pointer;
    border-radius: 3px;
}

.cal-event-more:hover {
    color: var(--text);
    background: var(--subtle-bg, rgba(0,0,0,0.05));
}

/* Hafta Görünümü */
.cal-week-table-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.cal-week-header-day {
    padding: 8px 4px;
    text-align: center;
    border-right: 1px solid var(--border);
    cursor: pointer;
}

.cal-week-header-day.is-today {
    background: rgba(2, 132, 199, 0.05);
}

.cal-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    flex: 1;
    border-left: 1px solid var(--border);
    overflow-y: auto;
}

.cal-week-day-column {
    border-right: 1px solid var(--border);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 400px;
}

.cal-week-day-column.is-today {
    background: rgba(2, 132, 199, 0.02);
}

/* Gün Görünümü */
.cal-day-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    overflow-y: auto;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

/* Ajanda Görünümü */
.cal-agenda-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
    overflow-y: auto;
}

.cal-agenda-day-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.cal-agenda-day-header {
    padding: 8px 12px;
    background: var(--subtle-bg, rgba(0,0,0,0.02));
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cal-agenda-day-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

.cal-agenda-day-items {
    display: flex;
    flex-direction: column;
}

.cal-agenda-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s ease;
}

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

.cal-agenda-item:hover {
    background: var(--subtle-bg, rgba(0,0,0,0.03));
}

.cal-agenda-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.cal-agenda-time-pill {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    min-width: 65px;
}

.cal-agenda-item-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-agenda-item-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Renk Seçici Butonları */
.cal-color-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.12s ease;
}

.cal-color-circle:hover {
    transform: scale(1.15);
}

.cal-color-circle.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--primary);
}

/* Mobil Uyum */
@media (max-width: 768px) {
    .calendar-workspace {
        flex-direction: column;
        gap: 8px;
    }
    .calendar-sidebar-panel {
        width: 100%;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-right: 0;
        padding-bottom: 8px;
    }
    .cal-stage-title {
        font-size: 1rem;
    }
    .cal-month-cell {
        min-height: 60px;
        padding: 2px;
    }
    .cal-event-pill {
        font-size: 0.65rem;
        padding: 1px 3px;
    }
}
