html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.input-group-sm .input-group-text,
.input-group-sm .form-control {
    padding: 0.25rem 0.5rem;
    line-height: 1.5;
}

.folder-icon {
    transition: transform 0.2s;
}

.rotate-90 {
    transform: rotate(90deg);
}

.folder-header {
    cursor: pointer;
    user-select: none;
}

.sidebar-collapse-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: background 0.2s;
    position: absolute;
    top: 50%;
    right: -12px; /* Kartın sağ border'ı üzerinde, dışarıda */
    transform: translateY(-50%);
    background: #fff;
}

.sidebar-collapse-btn:hover {
    background: #f2f2f2;
}

/* Collapsed menu styles */
.menu-collapsed .list-group-item span, .menu-collapsed .list-group-item-action span {
    display: none !important;
}
.sidebar-menu-item {
  min-height: 40px;
  align-items: center !important;
  display: flex;
}
.menu-collapsed .sidebar-collapse-btn {
    right: -12px;
}

/* Optional: animate width */
.menu-collapsed {
    width: 60px !important;
    min-width: 60px !important;
    min-height: 200px !important;
    transition: width 0.2s;
}
.menu-expanded {
    width: 100% !important;
    min-width: 180px !important;
    transition: width 0.2s;
}

@media (max-width: 768px) {
    .menu-collapsed, .menu-expanded {
        width: 48px !important;
        min-width: 48px !important;
    }
    .sidebar-collapse-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
}

.folder-content {
    display: none;
}

/* Sidebar başlangıç durumu - JavaScript yüklenmeden önce */
.sidebar-col {
    width: 20%;
    min-width: 10%;
}

.sidebar-col .card {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-col .card.menu-expanded,
.sidebar-col .card.menu-collapsed {
    opacity: 1;
}

/* Collapsed durumda sidebar */
.sidebar-col.collapsed-initial {
    width: 3%;
    min-width: 3%;
}

.sidebar-col.collapsed-initial .sidebar-menu-item span {
    display: none;
}

.sidebar-col.collapsed-initial .sidebar-menu-item {
    justify-content: center;
}

.sidebar-col.collapsed-initial .sidebar-menu-item i {
    margin-right: 0;
}
.vertical-dragbar {
    width: 8px;
    background: transparent;
    cursor: ew-resize;
    /* position: absolute; */
    top: 0;
    right: -4px;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
    user-select: none;
}

.drag-handle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 36px;
    width: 100%;
    gap: 4px;
}

.drag-dot {
    width: 4px;
    height: 4px;
    background: #aaa;
    border-radius: 50%;
    opacity: 0.8;
    transition: opacity 0.15s ease;
}

/* ===== Global App Sidebar ===== */
body:has(#appShell) {
    margin-bottom: 0 !important;
    overflow: hidden;
}

#appShell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

#appSidebar {
    width: 72px;
    min-width: 72px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-right: 1px solid #e5e7eb;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    z-index: 1050;
}

#appSidebar.sidebar-collapsed {
    margin-left: -72px;
    opacity: 0;
    pointer-events: none;
}

.app-sidebar-profile {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.app-sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    user-select: none;
}

.app-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.app-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.app-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.12);
    border-radius: 2px;
}

.app-sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.app-sidebar-nav li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
    padding: 4px 0;
}

.app-sidebar-nav li a .app-sidebar-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.app-sidebar-nav li a:hover .app-sidebar-icon {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.app-sidebar-nav li a .app-sidebar-label {
    font-size: 9px;
    color: #6c757d;
    text-align: center;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

.app-sidebar-footer {
    border-top: 1px solid #e5e7eb;
    padding: 12px 0;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.app-sidebar-footer a {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 18px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.app-sidebar-footer a:hover {
    color: #0d6efd;
    background: #e9ecef;
}

#sidebarToggle {
    position: fixed;
    left: 58px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1051;
    width: 28px;
    height: 48px;
    border-radius: 0 8px 8px 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: none;
    box-shadow: 2px 0 6px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    color: #6c757d;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebarToggle:hover {
    background: #f8f9fa;
    color: #0d6efd;
}

#sidebarToggle.toggle-collapsed {
    left: 0px !important;
    transform: translateY(-50%);
    border-radius: 0 8px 8px 0;
}

#sidebarToggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

#sidebarToggle.toggle-collapsed svg {
    transform: rotate(180deg);
}

#appMainWrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

#appMainWrapper > header {
    flex-shrink: 0;
}

#appMainWrapper > .container-fluid {
    flex: 1;
    overflow: auto;
}