/* Google Font Import - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root{
    /* ===== Colors ===== */
    --body-color: white;
    --sidebar-color: #E4E9F7;
    --primary-color: #695CFE;
    --primary-color-light: #F6F5FF;
    --toggle-color: #DDD;
    --text-color: #707070;
    /* ====== Transition ====== */
    --tran-03: all 0.2s ease;
    --tran-03: all 0.3s ease;
    --tran-04: all 0.3s ease;
    --tran-05: all 0.3s ease;
}
body{
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    background-color: var(--body-color);
    transition: var(--tran-05);
}
    
::selection{
    background-color: var(--primary-color);
    color: #fff;
}

/* ===== Sidebar ===== */
.sidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px;
    padding: 10px 14px;
    background: var(--sidebar-color);
    transition: var(--tran-05);
    z-index: 100;  
}
.sidebar.close{
    width: 88px;
}
/* ===== Reusable code - Here ===== */
.sidebar li{
    height: 50px;
    list-style: none;
    display: flex;
    align-items: center;
    margin-top: 10px;
}
.sidebar header .image,
.sidebar .icon{
    min-width: 60px;
    border-radius: 6px;
}
.sidebar .icon{
    min-width: 60px;
    border-radius: 6px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.sidebar .text,
.sidebar .icon{
    color: var(--text-color);
    transition: var(--tran-03);
}
.sidebar .text{
    font-size: 17px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 1;
}
.sidebar.close .text{
    opacity: 0;
}
/* =========================== */
.sidebar header{
    position: relative;
    margin-top: 1.5rem;
}
.sidebar header .image-text{
    display: flex;
    align-items: center;
}
.sidebar header .logo-text{
    display: flex;
    flex-direction: column;
}
header .image-text .brand {
    margin-top: 2px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Montserrat Alternates', sans-serif;
}
header .image-text .profession{
    font-size: 16px;
    margin-top: -2px;
    display: block;
}
.sidebar header .image{
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar header .image img{
    width: 40px;
    border-radius: 6px;
}
.sidebar header .toggle{
    position: absolute;
    top: 50%;
    right: -25px;
    transform: translateY(-50%) rotate(180deg);
    height: 25px;
    width: 25px;
    background-color: var(--primary-color);
    color: var(--sidebar-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: var(--tran-05);
}

.sidebar.close .toggle{
    transform: translateY(-50%) rotate(0deg);
}
.sidebar .menu{
    margin-top: 40px;
}

.sidebar li a{
    list-style: none;
    height: 100%;
    background-color: transparent;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    border-radius: 24px;
    text-decoration: none;
    transition: var(--tran-03);
}
.sidebar li a:hover{
    background-color: var(--primary-color);
}
.sidebar li a:hover .icon,
.sidebar li a:hover .text{
    color: var(--sidebar-color);
}

.sidebar .menu-bar{
    height: calc(100% - 55px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: scroll;
}
.menu-bar::-webkit-scrollbar{
    display: none;
}
.sidebar .menu-bar .mode{
    border-radius: 6px;
    background-color: var(--primary-color-light);
    position: relative;
    transition: var(--tran-05);
}
.menu-bar .mode .sun-moon{
    height: 50px;
    width: 60px;
}
.mode .sun-moon i{
    position: absolute;
}
.mode .sun-moon i.sun{
    opacity: 0;
}

.menu-bar .bottom-content .toggle-switch{
    position: absolute;
    right: 0;
    height: 100%;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
}
.toggle-switch .switch{
    position: relative;
    height: 22px;
    width: 40px;
    border-radius: 25px;
    background-color: var(--toggle-color);
    transition: var(--tran-05);
}
.switch::before{
    content: '';
    position: absolute;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    background-color: var(--sidebar-color);
    transition: var(--tran-04);
}

.home{
    position: absolute;
    top: 0;
    top: 0;
    left: 250px;
    height: 100vh;
    width: calc(100% - 250px);
    background-color: var(--body-color);
    transition: var(--tran-05);
}
.home .text{
    font-size: 30px;
    font-weight: 500;
    color: var(--text-color);
    padding: 12px 60px;
}
.sidebar.close ~ .home{
    left: 78px;
    height: 100vh;
    width: calc(100% - 78px);
}

.sidebar .user {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-top: 2px solid black;
    background-color: #e4e9f7;
}

.sidebar .user img {
    flex-shrink: 0;
}

.sidebar .user div {
    flex-grow: 1;
}

.sidebar .user img:last-child {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

/* Hide bottom content when sidebar is closed */
.sidebar.close .bottom-content p{
    display: none;
}

.content {
    transition: margin-left 0.3s ease-in-out;
    margin-left: 250px;
    padding: 20px;
}
.sidebar.close ~ .content {
    margin-left: 80px;
}

.menu-links > .nav-link.active > a {
    background-color: var(--primary-color);
}

.menu-links > .nav-link.active > a .icon,
.menu-links > .nav-link.active > a .text {
    color: var(--sidebar-color);
}


:root {
    --primary: #695CFE;
    --primary-dark: #5649d1;
    --primary-light: #f0eeff;
    --background: #f8f9fa;
    --text: #343a40;
    --text-light: #6c757d;
    --border: #e1e5eb;
    --success: #10b981;
    --radius: 12px;
    --shadow: 0 10px 25px rgba(0,0,0,0.1);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Wider modal with modern styling */
.modal-wide .modal-dialog {
    max-width: 900px;
}

@media (max-width: 992px) {
    .modal-wide .modal-dialog {
        max-width: 95%;
    }
}

.modal-content {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modal-title {
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: -0.3px;
}

.modal-body {
    padding: 30px;
    background-color: #fff;
}

.btn-close {
    filter: invert(1) brightness(200%);
}

/* Folder tree styling */
.folder-tree-container {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    background-color: var(--primary-light);
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
}

.folder-tree {
    list-style: none;
    padding-left: 0;
}

.folder-node {
    margin-bottom: 8px;
}

.folder-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.folder-header:hover {
    background-color: #f8f9ff;
    border-color: var(--primary);
    box-shadow: 0 3px 8px rgba(105, 92, 254, 0.1);
}

.folder-header.selected {
    background-color: rgba(105, 92, 254, 0.1);
    border-color: var(--primary);
}

.arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    transition: transform 0.3s ease;
    position: relative;
}

.arrow::before {
    content: "";
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid var(--text);
    transition: all 0.2s ease;
}

.folder-header.expanded .arrow {
    transform: rotate(90deg);
}

.folder-name {
    font-weight: 500;
    color: var(--text);
    font-size: 16px;
}

.children {
    list-style: none;
    padding-left: 34px;
    margin-top: 8px;
}

/* Conflict options styling */
.conflict-section {
    background-color: #f8f9ff;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
}

.conflict-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.conflict-option {
    flex: 1;
    min-width: 250px;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.conflict-option:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(105, 92, 254, 0.1);
}

.conflict-option.selected {
    border-color: var(--primary);
    background-color: rgba(105, 92, 254, 0.05);
}

.conflict-option input[type="radio"] {
    display: none;
}

.conflict-option label {
    display: block;
    cursor: pointer;
}

.conflict-option .option-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
    display: flex;
    align-items: center;
}

.conflict-option .option-title::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.2s ease;
}

.conflict-option.selected .option-title::before {
    border-color: var(--primary);
    background-color: var(--primary);
    box-shadow: inset 0 0 0 3px white;
}

.conflict-option .option-desc {
    font-size: 14px;
    color: var(--text-light);
    padding-left: 28px;
}

/* Button styling */
#move_submit_btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(105, 92, 254, 0.3);
    margin-top: 25px;
}

#move_submit_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(105, 92, 254, 0.4);
}

#move_submit_btn:active {
    transform: translateY(0);
}

/* Selection info */
.selection-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px 15px;
    background-color: #e8f4ff;
    border-radius: 8px;
    font-size: 15px;
}

.info-icon {
    width: 24px;
    height: 24px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Scrollbar styling */
.folder-tree-container::-webkit-scrollbar {
    width: 8px;
}

.folder-tree-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.folder-tree-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.folder-tree-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ========================================
   SIDEBAR DROPDOWN STYLES
   ======================================== */

/* Sidebar Dropdown Link - The parent container */
.sidebar-dropdown-link {
    position: relative;
    height: auto !important; /* Override default li height */
    flex-direction: column;
    align-items: flex-start;
}

/* Sidebar Dropdown Trigger - The main clickable RET button */
.sidebar-dropdown-trigger {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Sidebar Dropdown Chevron - The arrow icon */
.sidebar-dropdown-chevron {
    position: absolute;
    right: 15px;
    font-size: 16px;
    transition: transform 0.3s ease;
    color: var(--text-color);
}

.sidebar.close .sidebar-dropdown-chevron {
    opacity: 0;
}

.sidebar-dropdown-link.sidebar-open .sidebar-dropdown-chevron {
    transform: rotate(180deg);
}

/* Sidebar Dropdown List - The menu that appears */
.sidebar-dropdown-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

/* Show dropdown when open */
.sidebar-dropdown-link.sidebar-open .sidebar-dropdown-list {
    max-height: 500px;
    opacity: 1;
    padding-top: 5px;
}

/* Sidebar Dropdown List Items */
.sidebar-dropdown-list li {
    height: 45px;
    margin: 2px 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
}

.sidebar-dropdown-list li a {
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    padding: 0 20px 0 30px;
    text-decoration: none;
    transition: var(--tran-03);
    border-radius: 18px;
    background-color: transparent;
}

.sidebar-dropdown-list li a:hover {
    background-color: rgba(105, 92, 254, 0.7);
}

.sidebar-dropdown-list li a:hover .icon,
.sidebar-dropdown-list li a:hover .text {
    color: var(--sidebar-color);
}

.sidebar-dropdown-list li a .icon {
    min-width: 40px;
    font-size: 18px;
    color: var(--text-color);
}

.sidebar-dropdown-list li a .text {
    font-size: 15px;
    color: var(--text-color);
}

/* Active state for dropdown items - ONLY for the specific active item */
.sidebar-dropdown-list > li.active > a {
    background-color: var(--primary-color);
}

.sidebar-dropdown-list > li.active > a .icon,
.sidebar-dropdown-list > li.active > a .text {
    color: var(--sidebar-color);
}

/* When sidebar is closed, hide dropdown text */
.sidebar.close .sidebar-dropdown-list li a .text {
    opacity: 0;
}

/* Remove the full highlight for parent when any child is active */
.sidebar-dropdown-link.active > .sidebar-dropdown-trigger {
    background-color: transparent;
}

.sidebar-dropdown-link.active > .sidebar-dropdown-trigger .icon,
.sidebar-dropdown-link.active > .sidebar-dropdown-trigger .text,
.sidebar-dropdown-link.active > .sidebar-dropdown-trigger .sidebar-dropdown-chevron {
    color: var(--text-color);
}

/* Only highlight parent RET button when dropdown is actively open */
.sidebar-dropdown-link.sidebar-open > .sidebar-dropdown-trigger {
    background-color: var(--primary-color);
    border-radius: 24px;
}

.sidebar-dropdown-link.sidebar-open > .sidebar-dropdown-trigger .icon,
.sidebar-dropdown-link.sidebar-open > .sidebar-dropdown-trigger .text,
.sidebar-dropdown-link.sidebar-open > .sidebar-dropdown-trigger .sidebar-dropdown-chevron {
    color: var(--sidebar-color);
}

/* When sidebar is closed */
.sidebar.close .sidebar-dropdown-list {
    padding-left: 0;
}

.sidebar.close .sidebar-dropdown-list li a {
    padding-left: 20px;
    justify-content: center;
}