.directory-header,
.toolbar {
    background: #f5f5fa;
    border-radius: 1.5em 1.2em 1.5em 1.2em / 1.2em 1.5em 1.2em 1.5em;
    padding: 0.5em 1em;
    margin: 1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e0e0e0;
}

/* Directory Header Specific */
.directory-header {
    display: flex;
    align-items: center;
}

.directory-header .path a {
    display: inline;
    color: inherit;
    text-decoration: none;
    padding: 0.2em 0.5em;
    border-radius: 4px;
}

/* Toolbar Specific */
.toolbar {
    display: flex;
    gap: 1rem;
}

.toolbar .upload-section {
    display: flex;
    gap: 1em;
    align-items: center;
    flex: 1;
}

.toolbar .btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    transition: background-color 0.2s;
}

.toolbar .btn:hover {
    background: #e9e9e9;
}

.icon {
    font-style: normal;
    font-size: 1.2em;
}

/* File Entries */
.path-files {
    margin: 1em;
}

.file-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 0.8em;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.file-link {
    flex: 1;
    display: flex;
    align-items: center;
}

.file-link a {
    text-decoration: none;
    color: #333;
    font-size: 0.95em;
    flex-grow: 1;
    padding: 0.2em 0;
}

/* Options Menu */
.options-menu {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.options-btn {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: #666;
    padding: 0.3em;
    border-radius: 4px;
    display: none; /* hidden by default */
}

.options-btn {
    display: inline-block;
}

.options-btn:hover {
    background: rgba(0,0,0,0.05);
    color: #222;
}

/* Dropdown */
.options-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 10;
    min-width: 120px;
}

.options-dropdown .dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5em 1em;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    font-size: 0.9em;
}

.options-menu.open .options-dropdown {
    display: block;
}

.options-dropdown .dropdown-item:hover {
    background: #f5f5f5;
}

/* Responsive Design */
@media (max-width: 600px) {
    .directory-header,
    .toolbar {
        margin: 0.5em;
        padding: 1em;
    }

    .toolbar {
        width: auto;
        box-sizing: border-box;
    }

    .toolbar .upload-section {
        flex-direction: column;
        gap: 0.5em;
        width: 100%;
    }

    .toolbar form {
        width: 100%;
        margin: 0 0 0.5em 0;
        display: block;
    }

    .toolbar .btn {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    .toolbar input[type="text"] {
        width: 100%;
        padding: 0.5em;
        margin-bottom: 0.5em;
        box-sizing: border-box;
    }

    .toolbar label.btn {
        margin: 0;
        display: block;
    }

    .file-entry {
        flex-direction: column;
        align-items: stretch;
    }

    .options-menu {
        margin-top: 0.5em;
        justify-content: flex-end;
    }
}
