/* Silver Memories Admin — scoped to .sm-admin-layout, independent of the public-site CSS. */

/* ── Admin layout shell ───────────────────────────────────── */

.sm-admin-layout {
    display: flex;
    min-height: 100vh;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* --fs-* tiers come from brand.css (variables only) */
    font-size: var(--fs-base);
    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: var(--fs-xs);
    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: var(--fs-sm);
    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: var(--fs-sm);
    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;
}

/* Overlay badges on an image thumbnail ("Primary", "Approved", "Pending") */
.sm-admin-image-badges .badge {
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 0.2rem 0.45rem;
}

.btn-xs {
    font-size: var(--fs-xs);
    padding: 0.15rem 0.5rem;
    line-height: 1.5;
}

/* ── Update-review change diff (M2) ─────────────────────────── */

.sm-admin-diff-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sm-admin-diff-row {
    display: grid;
    grid-template-columns: minmax(7rem, 9rem) 1fr auto 1fr;
    gap: 0.35rem 0.6rem;
    align-items: baseline;
    padding: 0.4rem 0;
    border-bottom: 1px solid #e9ecef;
    font-size: var(--fs-sm);
}

.sm-admin-diff-row:last-child { border-bottom: none; }

.sm-admin-diff-label { font-weight: 600; color: #495057; }
.sm-admin-diff-old { color: #6c757d; text-decoration: line-through; word-break: break-word; }
.sm-admin-diff-arrow { color: #adb5bd; }
.sm-admin-diff-new { font-weight: 600; color: #212529; word-break: break-word; }

/* Contact-detail changes (email/phone) carry the most consequence — tint the row. */
.sm-admin-diff-row-contact {
    background: #fff8e1;
    border-left: 3px solid #f0ad4e;
    padding-left: 0.5rem;
    margin-left: -0.5rem;
}

/* Inline "changed" chip beside the email/phone labels. */
.sm-admin-diff-chip {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: #8a6d1a;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    margin-left: 0.35rem;
}

/* Whether the mobile on a submission was confirmed by SMS code. Everyone verifies during
   registration, so "not confirmed" only appears when the site-wide hourly code ceiling was spent and
   the registrant was let past rather than stranded — rare, and worth an admin ringing the number
   before publishing. Deliberately not the same yellow as the diff chip: one reports a change, the
   other reports a gap. */
.sm-admin-verified-chip,
.sm-admin-unverified-chip {
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    margin-left: 0.35rem;
}

.sm-admin-verified-chip {
    color: #1c6b52;
    background: #e3f4ee;
    border: 1px solid #a8ddc8;
}

.sm-admin-unverified-chip {
    color: #9e3a26;
    background: #fdf0ed;
    border: 1px solid #f3c0b4;
}

/* Stack the diff rows on narrow viewports so the page body never scrolls sideways. */
@media (max-width: 1100px) {
    .sm-admin-diff-row { grid-template-columns: 1fr; }
    .sm-admin-diff-arrow { display: none; }
}

/* ── 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;
}
