/* === File Manager === *//* === Base Styles === */
/* ==== Main Body ==== */
body {
    font-family: Arial, sans-serif;
    font-size:16px;
    background: #f2f4f8;
    color: #333;
    margin: 0;
    padding: 0;
}
.fas {  margin-right: 4px;
}
h1,h2,h3,h4 {
    margin: 5px 0;
}

.container {
    padding: 5px 10px;
    background: #e5ecf4;
}

/* ==== Navbar Styles ==== */
.navbar {
    background-color: #737374;
    padding: 5px 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    flex-wrap: wrap;
}

.navbar .logo {
    font-weight: bold;
    font-size: 18px;
}

.navbar .menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.navbar a:hover {
    opacity: 0.8;
}

/* Hamburger button */
.navbar .toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.navbar .toggle div {
    width: 25px;
    height: 3px;
    background: white;
    margin: 4px 0;
}

/* Mobile styles */
@media (max-width: 768px) {
    .navbar .menu {
        align-items: revert;
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #737374;
        padding-top: 10px;
    }

    .navbar .menu.show {
        display: flex;
    }

    .navbar .toggle {
        display: flex;
    }

    .navbar a {
        padding: 10px 0;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
}

/* ==== Dropdown Submenu ==== */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    flex-direction: column;
    background-color: #737374;
    min-width: 150px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.submenu a {
    padding: 10px;
    color: white;
    text-decoration: none;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.submenu a:hover {
    background-color: #004494;
}

/* Hover for desktop */
@media (min-width: 769px) {
    .dropdown:hover .submenu {
        display: flex;
    }
}

/* Toggle for mobile */
@media (max-width: 768px) {
    .dropdown .submenu {
        position: static;
        width: 100%;
    }

    .dropdown-toggle::after {
        content: ' ▼';
        font-size: 12px;
    }

    .dropdown.active .submenu {
        display: flex;
    }
}


/* ==== Form & Buttons ==== */
form {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 700px;
    margin: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

input, select, button {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    box-sizing:border-box;
}

select[multiple] {
    min-height: 180px;
    font-family: monospace;
    white-space: nowrap;
    overflow-x: auto;
}

button {
    background: #dee5f4;
    color: #494545;
    border: none;
    cursor: pointer;
}

button:hover {
    background: #f2f3fc;
}

/* ==== Messages ==== */
.success { color: green; }
.error { color: red; }



/* === File List === */
ul.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    height: 70vh;
    overflow: auto;
}

ul.file-list li {
    border-bottom: 1px solid #eee;
    font-family: monospace;
}

ul.file-list li .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    gap: 10px;
    flex-wrap: wrap;
}

ul.file-list .item-name {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

ul.file-list .item-name a {
    text-decoration: none;
    color: #007bff;
    font-weight: 500;
}

ul.file-list .item-name a:hover {
    text-decoration: underline;
}

ul.file-list .filetype,
ul.file-list .size {
    flex: 0 0 auto;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

ul.file-list .filetype {
    font-weight: bold;
    background: #e0e0e0;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    min-width: 60px;
    text-align: center;
}

/* === Context Menu === */
.context-menu {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100000;
    min-width: 150px;
    border-radius: 6px;
    padding: 0;
}

.context-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.context-menu li {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.context-menu li:last-child {
    border-bottom: none;
}

.context-menu li:hover {
    background-color: #f0f0f0;
}

/* === Toast Notifications === */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 200px;
    max-width: 300px;
    padding: 12px 18px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    animation: fadein 0.3s, fadeout 0.3s 2.7s;
    opacity: 0;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
}

.toast.success {
    background-color: #28a745;
}

.toast.error {
    background-color: #dc3545;
}

@keyframes fadein {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeout {
    from { opacity: 1; }
    to { opacity: 0; }
}

.breadcrumb {
    font-size: 14px;
    margin-bottom: 10px;
    color: #555;
    word-break: break-all;
}

.back-button {
    display: inline-block;
    padding: 5px 8px;
    background: #007bff;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s ease;
}

.back-button:hover {
    background: #0056b3;
}

.breadcrumb {
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
   border-top: 1px solid #fff;
  padding-top: 5px;

}
.breadcrumb a {
    text-decoration: none;
    color: #007bff;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.back-button {
    text-decoration: none;
    background: #50bbfb;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 13px;
    margin-right: 10px;
}
.inline-buttons button,
.back-button {
    width: auto;
    display: inline-block;
    padding: 5px 8px;
    margin: 2px;
    font-size: 13px;
}

form.full_width {
  width: 100% !important;
  min-width: 95%;
}
form.full_height {
  height: 100vh;
}

.file-list .row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}
.file-list .row > span {
    min-width: 100px;
}
.file-list .modified {
    color: #555;
    font-size: 13px;
}
.file-item.selected {
    background-color: #f0f8ff; /* Light blue */
    border-radius: 5px;
}

.path_value {
  background: #fbfdfd;
  position: relative;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 5px;
  min-width: 200px;
  border: 1px solid #ddd;
}



.file-list-header {
    background: #52606f;
    color: white;
    font-weight: bold;
    font-family: monospace;
    padding: 10px 15px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.file-list-header .row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.file-list-header .row > span {
    min-width: 100px;
    white-space: nowrap;
}


.file-list .row > .item-name,
.file-list-header .row > .item-name {
    flex: 1 1 auto;
    min-width: 180px;
}
.file-list .row > .filetype,
.file-list-header .row > .filetype {
    flex: 0 0 80px;
    text-align: center;
}
.file-list .row > .size,
.file-list-header .row > .size {
    flex: 0 0 80px;
    text-align: right;
}
.file-list .row > .modified,
.file-list-header .row > .modified {
    flex: 0 0 140px;
    text-align: right;
}

