/* Aly Market admin — sidebar comfort. Loaded globally from base_site.html.
   Scoped to #nav-sidebar only, so it can't affect the rest of the admin.
   Goal: calmer contrast, softer dividers, comfortable spacing, smooth hover —
   less visual fatigue on a long menu. */

#nav-sidebar {
    padding-block: 6px;
    /* Force the sidebar dark in EVERY theme. The link text is light-on-dark by
       design; in white mode the container went light and washed out the level-2
       (model) rows. Pin a dark bg so both levels stay consistently dark. */
    background: #15182a !important;
}
/* Keep section headers + rows transparent so they show the dark sidebar bg. */
#nav-sidebar .module, #nav-sidebar table, #nav-sidebar caption,
#nav-sidebar tbody, #nav-sidebar tbody tr { background: transparent !important; }

/* calmer link colour + comfortable, consistent rows (kill the hard "box" look) */
#nav-sidebar a {
    color: #cdd5e3 !important;
    padding: 7px 14px !important;
    border: 0 !important;
    border-radius: 8px !important;
    line-height: 1.35 !important;
    transition: background .12s, color .12s !important;
}

/* second level (model items) nested inward, under the section header */
#nav-sidebar tbody a,
#nav-sidebar tr a {
    padding-inline-start: 30px !important;
    font-size: 15px !important;
    color: #aeb7c7 !important;
}

/* soft divider instead of a hard border on every cell */
#nav-sidebar tbody tr > * {
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, .04) !important;
    background: transparent !important;
}
#nav-sidebar tbody tr:last-child > * { border-bottom: 0 !important; }

/* smooth, gentle hover (accent-tinted) */
#nav-sidebar a:hover {
    background: rgba(27, 132, 255, .14) !important;
    color: #ffffff !important;
}

/* current page: subtle accent, not a glaring block */
#nav-sidebar .current-model a,
#nav-sidebar tr.selected a {
    background: rgba(27, 132, 255, .20) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* tight spacing between sections (no big gaps when collapsed) */
#nav-sidebar .module,
#nav-sidebar > div,
#nav-sidebar table {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
}
#nav-sidebar table { margin-bottom: 2px !important; }

/* section headers: clear but calm, compact */
#nav-sidebar .module > caption,
#nav-sidebar caption {
    color: #8b93a7 !important;
    letter-spacing: .2px;
    padding: 9px 12px !important;
    margin: 0 !important;
    user-select: none;
}
#nav-sidebar .aly-caret {
    display: inline-block;
    float: right;                         /* arrow on the right (start) */
    width: 1.2em;
    font-size: 15px !important;
    font-weight: 700;
    color: #1b84ff !important;            /* clear accent arrow */
    transition: color .12s;
}
#nav-sidebar caption:hover { color: #ffffff !important; }
#nav-sidebar caption:hover .aly-caret { color: #56a8ff !important; }

/* collapsed section: hide its rows (reinforces admin_theme.css) */
#nav-sidebar table.aly-collapsed tbody { display: none !important; }

/* the filter box: comfortable, rounded, calm */
#nav-filter {
    margin: 4px 8px 10px !important;
    padding: 9px 12px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, .08) !important;
    background: rgba(255, 255, 255, .04) !important;
    color: #e6e9f0 !important;
}
#nav-filter:focus {
    border-color: rgba(27, 132, 255, .55) !important;
    background: rgba(255, 255, 255, .06) !important;
    outline: none !important;
}
#nav-filter::placeholder { color: #7a8296 !important; }
