/* Silver Memories Admin — fully independent of public-site CSS.
   All admin shell layout lives here. brand.css/site.css are scoped
   to .sm-public-site and do not affect this layout. */

/* ── Admin layout shell ───────────────────────────────────── */

.sm-admin-layout {
    display: flex;
    min-height: 100vh;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1rem;
    color: #212529;
    background-color: #f8f9fa;
}

/* ── Sidebar ──────────────────────────────────────────────── */

.sm-admin-sidebar {
    width: 240px;
    background: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
    color: #fff;
    padding: 1.5rem 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sm-admin-logo {
    display: block;
    padding: 0 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 1rem;
}

.sm-admin-logo img { height: 40px; width: auto; }

/* ── Nav ──────────────────────────────────────────────────── */

.sm-admin-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

/* ── Nav section header ───────────────────────────────────── */

.sm-admin-nav-section-header {
    padding: 1rem 1.25rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.40);
    user-select: none;
    list-style: none;
}

/* ── Nav sub-items ────────────────────────────────────────── */

.sm-admin-nav-subitem {
    list-style: none;
}

.sm-admin-nav-subitem a {
    display: block;
    padding: 0.6rem 1.25rem 0.6rem 1.75rem;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    transition: background-color 0.15s, color 0.15s;
    border-left: 3px solid transparent;
    font-family: inherit;
}

.sm-admin-nav-subitem a:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

.sm-admin-nav-subitem a.active {
    background-color: rgba(255,255,255,0.37);
    color: #fff;
    border-left-color: rgba(255,255,255,0.6);
}

/* ── Sign out link ────────────────────────────────────────── */

.sm-admin-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.sm-admin-signout {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.15s;
}

.sm-admin-signout:hover {
    color: rgba(255,255,255,0.85);
}

/* ── Main content area ────────────────────────────────────── */

.sm-admin-main {
    flex: 1;
    overflow: auto;
    background-color: #fff;
}

.sm-admin-content {
    padding: 1.5rem;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 768px) {
    .sm-admin-sidebar { display: none; }
}

/* ── Page content containers ──────────────────────────────── */

.sm-admin-form-page { max-width: 760px; }

/* ── Detail page two-column layout ───────────────────────────── */

.sm-admin-detail-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

@media (max-width: 1100px) {
    .sm-admin-detail-layout {
        grid-template-columns: 1fr;
    }
    .sm-admin-images-panel {
        position: static !important;
    }
}

.sm-admin-images-panel {
    position: sticky;
    top: 1.5rem;
}

/* ── Image grid & cards ───────────────────────────────────────── */

.sm-admin-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.sm-admin-image-card {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.sm-admin-image-thumb-wrap {
    position: relative;
}

.sm-admin-image-thumb {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.sm-admin-image-badges {
    position: absolute;
    top: 0.3rem;
    left: 0.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sm-admin-image-footer {
    padding: 0.3rem 0.4rem;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.btn-xs {
    font-size: 0.7rem;
    padding: 0.1rem 0.45rem;
    line-height: 1.5;
}

/* ── Page-level action header (description + primary action) ─ */

.sm-admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
