/* ============================================================
   VaultCTL v2 — Dark Vault Theme
   Built on Bootstrap 5.3 dark mode + custom CSS variables
   ============================================================ */

:root {
    --vault-bg:          #0c0c14;
    --vault-sidebar:     #0f0f1c;
    --vault-card:        #14141f;
    --vault-card-hover:  #1b1b2a;
    --vault-border:      #22223a;
    --vault-accent:      #7c5cfc;
    --vault-accent-dim:  rgba(124, 92, 252, 0.15);
    --vault-text:        #e2e2f0;
    --vault-muted:       #6a6a88;
    --vault-sidebar-w:   230px;
    --vault-topbar-h:    58px;
}

/* Override Bootstrap dark variables */
[data-bs-theme="dark"] {
    --bs-body-bg:       var(--vault-bg);
    --bs-body-color:    var(--vault-text);
    --bs-card-bg:       var(--vault-card);
    --bs-border-color:  var(--vault-border);
    --bs-secondary-bg:  var(--vault-card);
    --bs-primary-rgb:   124, 92, 252;
    --bs-primary:       var(--vault-accent);
}

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    background: var(--vault-bg);
    color: var(--vault-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--vault-accent); text-decoration: none; }
a:hover { color: #9b80ff; }

.text-accent { color: var(--vault-accent) !important; }
.bg-accent   { background-color: var(--vault-accent) !important; }

/* ── Auth Layout ───────────────────────────────────────────── */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 0%, #1a1040 0%, var(--vault-bg) 70%);
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
}

.auth-card {
    background: var(--vault-card);
    border: 1px solid var(--vault-border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 24px 80px rgba(0,0,0,.5);
}

.auth-logo { text-align: center; margin-bottom: 1.75rem; }
.auth-logo-img { max-height: 56px; }
.auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: .25rem; }
.auth-sub   { color: var(--vault-muted); text-align: center; margin-bottom: 1.5rem; font-size: .9rem; }

.auth-links {
    text-align: center;
    margin-top: 1.25rem;
    font-size: .875rem;
    color: var(--vault-muted);
}
.auth-links a { color: var(--vault-accent); }

.btn-vault {
    padding: .65rem 1rem;
    font-weight: 600;
    letter-spacing: .01em;
}

/* ── App Layout ────────────────────────────────────────────── */
.app-body { overflow-x: hidden; }

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--vault-sidebar-w);
    height: 100vh;
    background: var(--vault-sidebar);
    border-right: 1px solid var(--vault-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform .25s ease;
}

.sidebar-brand {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--vault-border);
}
.sidebar-logo { max-height: 38px; }

.sidebar-nav {
    flex: 1;
    padding: .75rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.25rem;
    color: var(--vault-muted);
    font-size: .875rem;
    font-weight: 500;
    border-radius: 0;
    transition: color .15s, background .15s;
    position: relative;
}
.nav-item i { width: 18px; text-align: center; font-size: 1rem; }
.nav-item:hover { color: var(--vault-text); background: var(--vault-accent-dim); }
.nav-item.active {
    color: #fff;
    background: var(--vault-accent-dim);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--vault-accent);
    border-radius: 0 2px 2px 0;
}

.nav-divider {
    height: 1px;
    background: var(--vault-border);
    margin: .5rem 1rem;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 1rem 1.25rem 1.5rem;
    border-top: 1px solid var(--vault-border);
}
.storage-meter { margin-bottom: 1rem; }
.storage-labels {
    display: flex;
    justify-content: space-between;
    font-size: .75rem;
    color: var(--vault-muted);
    margin-bottom: .35rem;
}
.storage-bar { height: 4px; background: #2a2a3e; border-radius: 2px; }
.storage-bar .progress-bar { background: var(--vault-accent); border-radius: 2px; }
.storage-pct { font-size: .7rem; color: var(--vault-muted); margin-top: .3rem; }

.btn-logout {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: var(--vault-muted);
    padding: .4rem .5rem;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.btn-logout:hover { color: #ef4444; background: rgba(239,68,68,.1); }

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 99;
}

/* Main content */
.main-wrap {
    margin-left: var(--vault-sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--vault-topbar-h);
    background: var(--vault-sidebar);
    border-bottom: 1px solid var(--vault-border);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    gap: .75rem;
}
.topbar-toggle {
    background: none;
    border: none;
    color: var(--vault-muted);
    font-size: 1.1rem;
    cursor: pointer;
    display: none;
    padding: .25rem .5rem;
}
.topbar-title {
    font-weight: 600;
    font-size: .95rem;
    flex: 1;
}
.topbar-user {
    font-size: .8rem;
    color: var(--vault-muted);
}

.page-content { padding: 1.5rem; flex: 1; }

/* Page header */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.5rem;
}
.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* ── Cards ─────────────────────────────────────────────────── */
.vault-card {
    background: var(--vault-card);
    border: 1px solid var(--vault-border);
    border-radius: 12px;
}
.card-section-title {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--vault-border);
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
    background: var(--vault-card);
    border: 1px solid var(--vault-border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}
.stat-card--warn { border-color: #f59e0b; }
.stat-icon { font-size: 1.5rem; color: var(--vault-accent); margin-bottom: .5rem; }
.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: .75rem; color: var(--vault-muted); margin-top: .25rem; }

/* ── Album Grid ─────────────────────────────────────────────── */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.album-card {
    background: var(--vault-card);
    border: 1px solid var(--vault-border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .2s, transform .2s, box-shadow .2s;
    display: block;
    color: inherit;
}
.album-card:hover {
    border-color: var(--vault-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(124,92,252,.2);
}
.album-cover {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #1a1a2e;
}
.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.album-card:hover .album-cover img { transform: scale(1.05); }
.album-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--vault-muted);
}
.album-lock-badge {
    position: absolute;
    top: .5rem; right: .5rem;
    background: rgba(0,0,0,.7);
    color: var(--vault-accent);
    border-radius: 50%;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem;
}
.album-info {
    padding: .75rem;
}
.album-name {
    font-weight: 600;
    font-size: .875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.album-desc, .album-date {
    font-size: .75rem;
    color: var(--vault-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: .2rem;
}

/* ── Media Grid ─────────────────────────────────────────────── */
.media-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .6rem;
}

.media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}
.media-thumb {
    aspect-ratio: 1;
    background: #1a1a2e;
    position: relative;
    overflow: hidden;
}
.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s;
    display: block;
}
.media-item:hover .media-thumb img { transform: scale(1.06); }
.media-enc-badge {
    position: absolute;
    bottom: .3rem;
    right: .3rem;
    z-index: 3;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .6rem;
    color: #22c55e;
    pointer-events: none;
}
.media-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.35);
    color: #fff;
    font-size: 1.5rem;
    pointer-events: none;
}
.media-badge {
    position: absolute;
    bottom: .3rem; left: .3rem;
    background: rgba(0,0,0,.75);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: .05em;
}
.media-select-overlay {
    position: absolute;
    inset: 0;
    background: rgba(124,92,252,.2);
    border: 2px solid var(--vault-accent);
    border-radius: 8px;
}
.media-checkbox {
    position: absolute;
    top: .4rem; right: .4rem;
    width: 22px; height: 22px;
    background: var(--vault-accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem; color: #fff;
}

/* ── Upload ─────────────────────────────────────────────────── */
.upload-dropzone {
    border: 2px dashed var(--vault-border);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: border-color .2s, background .2s;
    cursor: pointer;
}
.upload-dropzone.dragover {
    border-color: var(--vault-accent);
    background: var(--vault-accent-dim);
}
.upload-icon { font-size: 3rem; color: var(--vault-accent); margin-bottom: 1rem; }
.upload-label { font-size: 1.1rem; font-weight: 600; margin-bottom: .25rem; }

.upload-queue { display: flex; flex-direction: column; gap: .5rem; }
.upload-file {
    background: var(--vault-card);
    border: 1px solid var(--vault-border);
    border-radius: 8px;
    padding: .6rem .875rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .85rem;
}
.upload-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-file-status { font-size: .8rem; color: var(--vault-muted); white-space: nowrap; }
.upload-file-status.done  { color: #22c55e; }
.upload-file-status.error { color: #ef4444; }

/* ── Forms / Inputs ─────────────────────────────────────────── */
.form-control, .form-select {
    background-color: #1a1a2a !important;
    border-color: var(--vault-border) !important;
    color: var(--vault-text) !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--vault-accent) !important;
    box-shadow: 0 0 0 3px rgba(124,92,252,.2) !important;
}
.input-group-text {
    background-color: #1a1a2a;
    border-color: var(--vault-border);
    color: var(--vault-muted);
}
.form-check-input:checked { background-color: var(--vault-accent); border-color: var(--vault-accent); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
    background-color: var(--vault-accent);
    border-color: var(--vault-accent);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #6a49eb;
    border-color: #6a49eb;
}

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--vault-muted);
}
.empty-state i {
    font-size: 3.5rem;
    color: var(--vault-border);
    margin-bottom: 1rem;
    display: block;
}
.empty-state h3 { color: var(--vault-text); margin-bottom: .5rem; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-content {
    background: var(--vault-card) !important;
    border: 1px solid var(--vault-border) !important;
    border-radius: 14px !important;
}
.modal-backdrop { background: #000; }

/* ── Table ───────────────────────────────────────────────────── */
.table-dark { --bs-table-bg: var(--vault-card); --bs-table-border-color: var(--vault-border); }
.table-hover > tbody > tr:hover > * { background: var(--vault-card-hover); }

/* ── Mobile Bottom Nav ───────────────────────────────────────── */
.mobile-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 58px;
    background: var(--vault-sidebar);
    border-top: 1px solid var(--vault-border);
    display: flex;
    z-index: 100;
}
.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: .65rem;
    color: var(--vault-muted);
    text-decoration: none;
    padding: .4rem 0;
    transition: color .15s;
}
.mobile-nav-item i { font-size: 1.1rem; }
.mobile-nav-item.active, .mobile-nav-item:hover { color: var(--vault-accent); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .sidebar {
        transform: translateX(calc(-1 * var(--vault-sidebar-w)));
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.open { display: block; }
    .main-wrap { margin-left: 0; padding-bottom: 58px; }
    .topbar-toggle { display: block; }
    .page-content { padding: 1rem .875rem; }
    .album-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .media-grid  { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .4rem; }
}

@media (min-width: 768px) {
    .topbar-toggle { display: none; }
}

/* PWA safe area padding */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(58px + env(safe-area-inset-bottom)); }
    .main-wrap  { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
}

/* ── Auth aliases ─────────────────────────────────────────── */
.auth-wrap     { width: 100%; max-width: 420px; padding: 1.5rem; }
.auth-subtitle { color: var(--vault-muted); text-align: center; margin-bottom: 1.5rem; font-size: .9rem; }
.auth-footer   { text-align: center; margin-top: 1.25rem; font-size: .875rem; color: var(--vault-muted); }
.auth-footer a { color: var(--vault-accent); }
.auth-logo img { max-height: 56px; }

/* ── Accent button ────────────────────────────────────────── */
.btn-accent {
    background: var(--vault-accent);
    border-color:  var(--vault-accent);
    color: #fff;
    font-weight: 600;
}
.btn-accent:hover, .btn-accent:focus {
    background: #6a49eb;
    border-color: #6a49eb;
    color: #fff;
}
.btn-xs { padding: .15rem .4rem; font-size: .75rem; }

/* ── Page headings ────────────────────────────────────────── */
.page-heading { font-size: 1.4rem; font-weight: 700; margin: 0; }
.page-sub     { font-size: .85rem; color: var(--vault-muted); margin: .25rem 0 0; }
.btn-back     { font-size: .8rem; color: var(--vault-muted); display: inline-flex; align-items: center; gap: .3rem; }
.btn-back:hover { color: var(--vault-accent); }

/* ── Album thumb aliases ──────────────────────────────────── */
.album-thumb {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #1a1a2e;
}
.album-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.album-card:hover .album-thumb img { transform: scale(1.05); }

.album-thumb-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: var(--vault-muted);
}
.album-count { font-size: .75rem; color: var(--vault-muted); margin-top: .2rem; }
.album-name  { font-weight: 600; font-size: .875rem; display: block;
               white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-info  { padding: .75rem; }
.album-locked { border-color: var(--vault-accent); }

/* ── Media item ───────────────────────────────────────────── */
.media-check {
    position: absolute; top: .4rem; left: .4rem; z-index: 2;
}
.media-thumb-video {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: #111;
    font-size: 2rem; color: rgba(255,255,255,.7);
}
.media-caption {
    padding: .3rem .4rem;
    font-size: .75rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--vault-muted);
}

/* ── Upload card ──────────────────────────────────────────── */
.upload-card {
    background: var(--vault-card);
    border: 1px solid var(--vault-border);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 640px;
}
.upload-file-input {
    position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.upload-file-row {
    background: var(--vault-card);
    border: 1px solid var(--vault-border);
    border-radius: 8px;
    padding: .5rem .875rem;
    display: flex; align-items: center; gap: .75rem;
    font-size: .85rem;
}
.upload-status { font-size: .8rem; white-space: nowrap; color: var(--vault-muted); }
.upload-status.text-success { color: #22c55e !important; }
.upload-status.text-danger  { color: #ef4444 !important; }
.upload-status.text-warning { color: #f59e0b !important; }

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox-content {
    background: #000 !important;
    border: none !important;
    border-radius: 4px !important;
    position: relative;
}
.lightbox-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 60vh; padding: 1rem 4rem;
}
.lightbox-media { max-height: 80vh; max-width: 100%; object-fit: contain; }
.lightbox-caption {
    text-align: center; padding: .5rem 1rem 1rem;
    color: var(--vault-muted); font-size: .85rem;
}
.lightbox-close {
    position: absolute; top: .75rem; right: .75rem; z-index: 10;
    background: rgba(0,0,0,.6); border: none; border-radius: 50%;
    width: 36px; height: 36px; color: #fff; font-size: 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,.15); }
.lightbox-prev, .lightbox-next {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
    background: rgba(0,0,0,.5); border: none; border-radius: 50%;
    width: 44px; height: 44px; color: #fff; font-size: 1.1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.lightbox-prev { left: .75rem; }
.lightbox-next { right: .75rem; }
.lightbox-prev:hover, .lightbox-next:hover { background: var(--vault-accent); }
@media (max-width: 576px) {
    .lightbox-body { padding: 1rem 3rem; }
    .lightbox-prev { left: .25rem; }
    .lightbox-next { right: .25rem; }
}

/* ── Unlock card ──────────────────────────────────────────── */
.unlock-wrap {
    display: flex; align-items: center; justify-content: center;
    min-height: 50vh; padding: 2rem;
}
.unlock-card {
    background: var(--vault-card);
    border: 1px solid var(--vault-border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 380px;
    width: 100%;
}
.unlock-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }

/* ── Admin nav cards ─────────────────────────────────────── */
.admin-nav-card {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: .6rem; padding: 1.5rem 1rem;
    background: var(--vault-card);
    border: 1px solid var(--vault-border);
    border-radius: 12px;
    color: var(--vault-muted);
    text-align: center;
    transition: border-color .2s, color .2s;
    font-size: .875rem; font-weight: 500;
    text-decoration: none;
}
.admin-nav-card i { font-size: 1.75rem; color: var(--vault-accent); }
.admin-nav-card:hover { border-color: var(--vault-accent); color: var(--vault-text); }

/* ── Admin table ─────────────────────────────────────────── */
.vault-table { font-size: .85rem; }
.vault-table td, .vault-table th { vertical-align: middle; }

/* ── Empty state icon ────────────────────────────────────── */
.empty-icon { font-size: 3.5rem; color: var(--vault-border); display: block; margin-bottom: 1rem; }

/* ── Topbar search ───────────────────────────────────────── */
.topbar-search {
    position: relative;
    flex: 1;
    max-width: 360px;
    margin: 0 .75rem;
}
.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute; left: .7rem;
    color: var(--vault-muted); font-size: .85rem;
    pointer-events: none;
}
.search-input {
    width: 100%;
    background: #1a1a2a;
    border: 1px solid var(--vault-border);
    border-radius: 20px;
    padding: .4rem .75rem .4rem 2rem;
    color: var(--vault-text);
    font-size: .85rem;
    outline: none;
    transition: border-color .15s;
}
.search-input:focus { border-color: var(--vault-accent); }
.search-input::placeholder { color: var(--vault-muted); }

.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--vault-card);
    border: 1px solid var(--vault-border);
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(0,0,0,.5);
    z-index: 200;
    max-height: 400px;
    overflow-y: auto;
}
.search-dropdown.open { display: block; }

.search-result {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .875rem;
    cursor: pointer;
    transition: background .12s;
    text-decoration: none;
    color: inherit;
}
.search-result:hover { background: var(--vault-card-hover); }

.search-result-thumb {
    width: 44px; height: 44px;
    border-radius: 6px;
    overflow: hidden;
    background: #1a1a2e;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: var(--vault-muted);
}
.search-result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-result-locked { color: var(--vault-accent); }

.search-result-info { display: flex; flex-direction: column; min-width: 0; }
.search-result-title {
    font-size: .875rem; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-result-album { font-size: .75rem; color: var(--vault-muted); }

.search-empty {
    padding: 1rem;
    text-align: center;
    color: var(--vault-muted);
    font-size: .875rem;
}

@media (max-width: 767.98px) {
    .topbar-search { max-width: none; margin: 0 .5rem; }
    .topbar-user   { display: none; }
}

/* ── Album drag-and-drop overlay ─────────────────────────────── */
.album-drop-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(124, 92, 252, 0.18);
    backdrop-filter: blur(2px);
    border: 3px dashed var(--vault-accent);
    align-items: center;
    justify-content: center;
}
.album-drop-overlay.active {
    display: flex;
}
.album-drop-inner {
    text-align: center;
    pointer-events: none;
}
.album-drop-inner i {
    font-size: 4rem;
    color: var(--vault-accent);
    margin-bottom: 1rem;
    display: block;
    filter: drop-shadow(0 0 24px var(--vault-accent));
}
.album-drop-inner p {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,.7);
}

/* ── Album upload toast ───────────────────────────────────────── */
.album-upload-toast {
    position: fixed;
    bottom: 80px;
    right: 1rem;
    z-index: 800;
    background: var(--vault-card);
    border: 1px solid var(--vault-border);
    border-radius: 12px;
    padding: .75rem 1rem;
    min-width: 260px;
    max-width: 340px;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
@media (min-width: 768px) {
    .album-upload-toast { bottom: 1.25rem; }
}

/* ── Encryption badge ─────────────────────────────────────────── */
.media-enc-badge {
    position: absolute;
    bottom: .3rem;
    right: .3rem;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: rgba(0,0,0,.65);
    display: flex; align-items: center; justify-content: center;
    font-size: .6rem;
    color: #22c55e;
    pointer-events: none;
}

/* ── Site banner ──────────────────────────────────────────────── */
.site-banner {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 1.25rem;
    font-size: .875rem;
    font-weight: 500;
    flex-wrap: wrap;
}
.site-banner.alert-info    { background: #0d3a5c; color: #93c5fd; }
.site-banner.alert-success { background: #0f3d25; color: #86efac; }
.site-banner.alert-warning { background: #3d2a00; color: #fde68a; }
.site-banner.alert-danger  { background: #3d0f0f; color: #fca5a5; }
.site-banner-msg { flex: 1; }
.site-banner-link {
    color: inherit;
    text-decoration: underline;
    white-space: nowrap;
}
.site-banner-close {
    background: none;
    border: none;
    color: inherit;
    opacity: .6;
    cursor: pointer;
    padding: 0 .25rem;
    margin-left: auto;
    font-size: .8rem;
}
.site-banner-close:hover { opacity: 1; }

/* ── Banner admin rows ────────────────────────────────────────── */
.banner-admin-row {
    border: 1px solid var(--vault-border);
    border-radius: 10px;
    padding: .85rem 1rem;
    background: var(--vault-bg);
}
.banner-admin-row.active {
    border-color: #7c6afa55;
    background: rgba(124,106,250,.06);
}

/* ── Blast log ────────────────────────────────────────────────── */
.blast-log {
    max-height: 200px;
    overflow-y: auto;
    color: #6b7280;
}

/* ── Share page ───────────────────────────────────────────────── */
.share-page-body {
    min-height: 100vh;
    background: #0c0c14;
}
