/* Custom Admin Sidebar Fixes */

/* Fix the empty blue headers - hide them completely */
.app-list section h2 {
    display: none;
}

/* Make the app list look better */
.app-list {
    margin: 0;
    padding: 0;
}

/* Fix the module styling */
.module {
    border: none;
    margin-bottom: 10px;
    background: transparent;
}

/* Style the app labels properly */
.app-list section {
    margin-bottom: 20px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

/* Create a proper header for each app section */
.app-list section::before {
    content: attr(aria-labelledby);
    display: block;
    padding: 10px 15px;
    background: #417690;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    border-bottom: 1px solid #2d5468;
}

/* Fix the table styling in sidebar */
.app-list table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.app-list tr {
    border-bottom: 1px solid #e1e4e8;
}

.app-list tr:last-child {
    border-bottom: none;
}

.app-list th {
    display: none;
}

.app-list td {
    padding: 0;
    border: none;
}

/* Style the links properly */
.app-list a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    background: transparent;
    border: none;
    text-align: right;
    transition: background-color 0.2s;
}

.app-list a:hover,
.app-list a:focus {
    background: #f6f8fa;
    color: #417690;
}

/* Fix the "Change" links */
.changelink {
    font-weight: 500;
}

/* Remove any button-like appearance */
.app-list button {
    display: none;
}

/* Fix spacing */
#content-related {
    margin-left: 20px;
}

/* Ensure proper RTL support */
.app-list * {
    direction: rtl;
    text-align: right;
}

/* Fix the model names to show properly */
.app-list caption {
    display: none;
}

/* Better styling for the whole sidebar */
#content-related .module {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}

#content-related .module h2 {
    margin: 0;
    padding: 10px 15px;
    background: #417690;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border: none;
}

#content-related .module h3 {
    margin: 0;
    padding: 8px 15px;
    background: #f6f8fa;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid #e1e4e8;
}

/* Fix recent actions if present */
#recent-actions-module h2 {
    display: block;
}

#recent-actions-module ul {
    padding: 0;
    margin: 0;
}

#recent-actions-module li {
    padding: 8px 15px;
    border-bottom: 1px solid #e1e4e8;
    list-style: none;
}

#recent-actions-module li:last-child {
    border-bottom: none;
}
