/* Global Layout & Dual Scroll Architecture */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    height: 100vh;
    height: 100dvh;
    display: flex;
    overflow: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--bg-input);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Layout Container */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* Sidebar - Linear / Slack Tarzı Pürüzsüz Tam Kayar Menü */
.sidebar {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    height: 100vh;
    height: 100dvh;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 0;
    flex-shrink: 0;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 1060;
    overflow-x: hidden;
    margin-left: 0;
    transition: margin-left 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
    will-change: margin-left;
}

.sidebar.collapsed {
    margin-left: -260px !important;
    box-shadow: none !important;
}


/* Topbar Sidebar Toggle Butonu */
.sidebar-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Header ile Yüksekliği Tam Eşit 70px Logo/Brand Alanı */
.brand {
    height: 70px;
    min-height: 70px;
    max-height: 70px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 18px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
    flex-shrink: 0;
    background-color: var(--bg-sidebar);
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 12px;
    box-sizing: border-box;
}

.brand-text-wrapper {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
    min-width: 0;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: var(--brand-icon-bg);
    border: 1px solid var(--brand-icon-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-icon-color);
    font-size: 20px;
    box-shadow: var(--brand-icon-shadow);
    flex-shrink: 0;
    overflow: hidden;
    padding: 3px;
    box-sizing: border-box;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.brand-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.brand-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
}

.brand-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 12px 24px 12px;
}

.nav-group {
    display: flex;
    flex-direction: column;
}

.nav-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-toggle-btn:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-main);
}

.nav-toggle-btn .toggle-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
}

.nav-toggle-btn .toggle-title i {
    font-size: 15px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.nav-toggle-btn .nav-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-toggle-btn .chevron-icon {
    font-size: 11px;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-group.open .nav-toggle-btn .chevron-icon {
    transform: rotate(180deg);
}

.nav-group.open .nav-toggle-btn {
    color: var(--text-main);
}

.nav-submenu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-left: 14px;
    margin-top: 0;
    border-left: 2px solid var(--border-color);
    margin-left: 18px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
                opacity 0.22s ease,
                margin-top 0.22s ease,
                visibility 0.28s ease;
}

.nav-group.open .nav-submenu {
    max-height: 380px;
    opacity: 1;
    margin-top: 4px;
    visibility: visible;
}

.nav-submenu .nav-link {
    font-size: 13px;
    padding: 10px 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-main);
}

.nav-link.active {
    background-color: var(--nav-active-bg);
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

/* Main Content Area */
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    min-width: 0;
    overflow: hidden;
}

.top-bar {
    height: 70px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-sidebar);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-header h1 {
    font-size: 20px;
    font-weight: 700;
}

/* .content-area tanımı style.css'e taşındı (bu dosya components.css'ten
   önce yüklendiği için buradaki kural hiçbir zaman etkili olmuyordu —
   bkz. style.css'teki not). Ölü kod olarak burada kalmasın diye kaldırıldı. */
