main > .container, main > .container-fluid
{
    padding: 70px 15px 20px;
}

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
}

.footer > .container, .footer > .container-fluid {
    padding-right: 15px;
    padding-left: 15px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th,
.grid-view td:last-child {
    white-space: nowrap;
}

.grid-view .filters input,
.grid-view .filters select {
    min-width: 50px;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.navbar form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {
    .navbar form > button.logout {
        display:block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.navbar form > button.logout:focus,
.navbar form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.navbar form > button.logout:focus {
    outline: none;
}

/* style breadcrumb widget as in previous bootstrap versions */
.breadcrumb {
    background-color: var(--bs-gray-200);
    border-radius: .25rem;
    padding: .75rem 1rem;
}

.breadcrumb-item > a
{
    text-decoration: none;
}

/* ============================================================
   MEDIA SITE LAYOUT  (ms-*)
   Applied only to site/index via the "media" layout
   ============================================================ */

/* Reset body for full-screen layout */
body.ms-body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    background: #f0f2f5;
}

/* Root flex container */
.ms-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.ms-sidebar {
    width: 60px;
    background: #1c1c2e;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    z-index: 100;
}

.ms-sidebar-top {
    padding: 14px 0 10px;
    display: flex;
    justify-content: center;
}

.ms-lang-badge {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #2d2d45;
    border-radius: 4px;
    padding: 3px 7px;
    letter-spacing: 0.5px;
}

.ms-sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    padding: 8px 0;
}

.ms-sidebar-bottom {
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ms-nav-item {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 20px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.ms-nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
}

.ms-nav-item.ms-nav-active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* ── Main area (right of sidebar) ─────────────────────────── */
.ms-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Header ────────────────────────────────────────────────── */
.ms-header {
    height: 62px;
    background: #fff;
    border-bottom: 1px solid #e8eaed;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 20px;
    flex-shrink: 0;
}

.ms-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}

.ms-logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.ms-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.ms-brand-name {
    font-size: 15px;
    font-weight: 800;
    color: #0077b6;
    letter-spacing: 1.5px;
}

.ms-brand-sub {
    font-size: 8px;
    font-weight: 600;
    color: #555;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.ms-header-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f6f8;
    border-radius: 8px;
    padding: 0 14px;
    height: 38px;
    max-width: 500px;
}

.ms-search-icon {
    color: #888;
    font-size: 16px;
    flex-shrink: 0;
}

.ms-search-input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: #333;
}

.ms-search-input::placeholder {
    color: #aaa;
}

.ms-search-clear {
    background: none;
    border: none;
    padding: 0 4px;
    cursor: pointer;
    color: #aaa;
    font-size: 13px;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.15s;
}

.ms-search-clear:hover {
    color: #555;
}

.ms-header-right {
    margin-left: auto;
}

.ms-categories-select {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dde0e4;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    background: #fff;
    min-width: 160px;
    justify-content: space-between;
}

.ms-categories-select i {
    color: #888;
    font-size: 13px;
}

/* ── Page body (filter + grid) ─────────────────────────────── */
.ms-page-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.ms-content-area {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: 100%;
}

/* ── Filters Panel ──────────────────────────────────────────── */
.ms-filters-panel {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e8eaed;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.ms-zip-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f5f6f8;
    border-bottom: 1px solid #e8eaed;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.ms-zip-bar:hover {
    background: #eceef2;
}

.ms-zip-bar:active {
    background: #e2e5ea;
}

.ms-zip-icon {
    font-size: 18px;
    color: #555;
}

.ms-zip-label {
    font-weight: 600;
    color: #333;
}

.ms-zip-count {
    color: #777;
    font-size: 12px;
}

.ms-zip-arrow {
    margin-left: auto;
    color: #aaa;
    font-size: 13px;
}

.ms-filter-section {
    border-bottom: 1px solid #eef0f3;
}

.ms-filter-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 16px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    text-align: left;
}

.ms-filter-header:hover {
    background: #f8f9fa;
}

.ms-filter-arrow {
    color: #999;
    font-size: 13px;
    transition: transform 0.2s;
}

.ms-filter-header[aria-expanded="true"] .ms-filter-arrow {
    transform: rotate(180deg);
}

.ms-filter-body {
    padding: 4px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ms-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}

.ms-filter-option input[type="checkbox"] {
    accent-color: #0077b6;
}

/* ── Asset Grid ─────────────────────────────────────────────── */
.ms-asset-grid {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    align-content: start;
}

@media (max-width: 1400px) {
    .ms-asset-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1100px) {
    .ms-asset-grid { grid-template-columns: repeat(3, 1fr); }
}

.ms-asset-card {
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.15s;
}

.ms-asset-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.13);
}

.ms-asset-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #c5e4f3;
}

.ms-thumb-expand {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}

.ms-asset-card:hover .ms-thumb-expand {
    opacity: 1;
}

.ms-asset-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    gap: 6px;
}

.ms-asset-title {
    font-size: 12px;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.ms-asset-folder {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #aaa;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.ms-asset-folder:hover {
    color: #0077b6;
    background: #eef6fb;
}

/* ── Mobile layout  (≤ 767px) ──────────────────────────────── */
@media (max-width: 767px) {

    body.ms-body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
        padding-bottom: 64px;
    }

    .ms-layout {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow: visible;
        width: 100%;
    }

    /* Sidebar → bottom bar */
    .ms-sidebar {
        width: 100%;
        height: 60px;
        flex-direction: row;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 200;
        padding: 0 8px;
    }
    .ms-sidebar-top,
    .ms-sidebar-bottom { display: none; }
    .ms-sidebar-nav {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
        flex: 1;
        padding: 0;
        gap: 0;
    }
    .ms-nav-item {
        flex: 1;
        border-radius: 0;
        height: 60px;
    }

    /* Main */
    .ms-main {
        height: auto;
        overflow: visible;
    }

    /* Header */
    .ms-header {
        padding: 0 14px;
        gap: 10px;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    .ms-header-brand { min-width: 0; }
    .ms-brand-sub { display: none; }
    .ms-header-search { max-width: none; }
    .ms-categories-select { display: none; }

    /* Page body */
    .ms-page-body {
        overflow: visible;
        height: auto;
        display: block;
    }
}