/* ============================================================
   DASHBOARD LAYOUT — Bootstrap-based
   ============================================================ */

:root {
    --dash-sidebar-w: 260px;
    --dash-topbar-h: 64px;
    --rose-soft: #f9ebec;
    --gold-soft: #f8efd6;
}

body.user-body { background: #f6f1ea; overflow-x: hidden; }

.dash-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ============ SIDEBAR ============ */
.dash-sidebar {
    width: var(--dash-sidebar-w);
    background: linear-gradient(180deg, #7B2D3E 0%, #5a1f2c 100%);
    color: #fff;
    position: fixed; top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 1040;
    transition: transform .25s ease;
    display: flex; flex-direction: column;
}
.dash-sidebar::-webkit-scrollbar { width: 6px; }
.dash-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }

.dash-brand {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.dash-brand a {
    display: flex; align-items: center; gap: 10px;
    color: #fff; text-decoration: none; font-weight: 700; font-size: 18px;
}
.dash-brand .brand-emoji { font-size: 24px; }
.dash-brand .brand-text { color: #f4e5b1; }
.dash-close {
    background: transparent; border: none; color: #fff; font-size: 20px; cursor: pointer;
}

.dash-user {
    padding: 16px 20px; display: flex; gap: 12px; align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.dash-user img {
    width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,.3);
}
.dash-user-info strong { display: block; font-size: 14px; color: #fff; }
.dash-user-info small { color: rgba(255,255,255,.7); font-size: 12px; }

.dash-nav {
    padding: 12px 10px 30px;
    display: flex; flex-direction: column; gap: 2px;
    flex: 1;
}
.dash-nav .nav-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
    color: rgba(255,255,255,.45);
    padding: 14px 14px 6px;
}
.dash-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 8px;
    color: rgba(255,255,255,.85);
    text-decoration: none; font-size: 14px;
    transition: background .15s;
}
.dash-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.dash-nav a.active {
    background: linear-gradient(135deg, rgba(212,175,55,.35), rgba(212,175,55,.15));
    color: #fff; font-weight: 600;
    box-shadow: inset 3px 0 0 var(--gold);
}
.dash-nav a i { font-size: 17px; min-width: 20px; }
.dash-nav a .nav-badge {
    margin-left: auto;
    background: #C0392B; color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 999px;
}
.dash-nav a.nav-logout-link { color: #ffb3b3; margin-top: 20px; }

/* ============ MAIN ============ */
.dash-main {
    margin-left: var(--dash-sidebar-w);
    flex: 1;
    min-width: 0;
    display: flex; flex-direction: column;
}

/* TOPBAR */
.dash-topbar {
    background: #fff;
    height: var(--dash-topbar-h);
    padding: 0 24px;
    display: flex; align-items: center; gap: 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,.04);
    position: sticky; top: 0; z-index: 1030;
}
.dash-title {
    font-size: 20px; font-weight: 600; margin: 0;
    color: var(--maroon, #7B2D3E);
    flex: 1;
}
.dash-toggle {
    background: transparent; border: none; font-size: 24px;
    color: var(--maroon, #7B2D3E); cursor: pointer;
}
.dash-topbar-actions { display: flex; align-items: center; gap: 14px; }
.tb-icon {
    position: relative; font-size: 20px;
    color: var(--maroon, #7B2D3E); text-decoration: none;
    padding: 6px;
}
.tb-icon:hover { color: var(--rose, #B76E79); }
.tb-badge {
    position: absolute; top: 0; right: -2px;
    background: #C0392B; color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 1px 5px; border-radius: 999px;
}
.tb-user-btn {
    display: flex; align-items: center; gap: 8px;
    background: transparent; border: 1px solid #e5e5e5;
    border-radius: 999px; padding: 4px 12px 4px 4px;
    cursor: pointer; font-size: 14px;
}
.tb-user-btn img {
    width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
}
.tb-user-btn i { font-size: 12px; }

/* CONTENT */
.dash-content {
    padding: 24px;
    flex: 1;
}

/* ============ WELCOME BANNER ============ */
.welcome-banner {
    background: linear-gradient(135deg, var(--maroon, #7B2D3E), var(--rose, #B76E79));
    color: #fff; border-radius: 14px;
    padding: 20px 24px;
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px; flex-wrap: wrap;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(123,45,62,.18);
}
.wb-left { display: flex; gap: 16px; align-items: center; }
.wb-avatar {
    width: 60px; height: 60px; border-radius: 50%; object-fit: cover;
    border: 3px solid rgba(255,255,255,.4);
}
.welcome-banner h2 { font-size: 22px; margin: 0 0 4px; }
.wb-sub { margin: 0; opacity: .9; font-size: 14px; }
.wb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.welcome-banner .badge-green { background: rgba(255,255,255,.2); color: #fff; }
.welcome-banner .badge-blue  { background: rgba(255,255,255,.2); color: #fff; }

/* ============ STAT CARDS ============ */
.stat-card {
    background: #fff; border-radius: 12px;
    padding: 16px; display: flex; gap: 12px; align-items: center;
    text-decoration: none; color: inherit;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
    transition: transform .15s, box-shadow .15s;
    height: 100%;
    border: 1px solid transparent;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    border-color: var(--gold, #D4AF37);
    color: inherit;
}
.stat-card.stat-highlight {
    border-color: var(--rose, #B76E79);
    background: linear-gradient(180deg, #fff, #fffaf2);
}
.sc-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: grid; place-items: center; font-size: 22px;
    flex-shrink: 0;
}
.sc-icon-rose  { background: var(--rose-soft); color: #B76E79; }
.sc-icon-blue  { background: #e6eef7; color: #2c5f8a; }
.sc-icon-green { background: #e6f4ea; color: #1e7b3a; }
.sc-icon-gold  { background: var(--gold-soft); color: #7a5a12; }
.sc-body { display: flex; flex-direction: column; min-width: 0; }
.sc-label { font-size: 12px; color: var(--muted, #8a8a8a); }
.sc-value { font-size: 22px; color: var(--maroon, #7B2D3E); font-weight: 700; }

/* ============ CARDS ============ */
.dash-content .card { border-radius: 12px; }
.dash-content .card-header h5 { color: var(--maroon, #7B2D3E); font-size: 16px; }

.bg-gradient-rose { background: linear-gradient(90deg, #B76E79, #7B2D3E); }
.bg-gradient-gold { background: linear-gradient(90deg, #D4AF37, #f4e5b1); }

/* ============ CHAT ROWS ============ */
.chat-row {
    display: flex; gap: 12px; align-items: center;
    padding: 12px 8px; border-radius: 10px;
    text-decoration: none; color: inherit;
    border-bottom: 1px solid #f4ecdf;
    transition: background .15s;
}
.chat-row:last-child { border-bottom: none; }
.chat-row:hover { background: #faf6f1; color: inherit; }
.chat-row.unread { background: #fffaf2; }
.chat-avatar { position: relative; flex-shrink: 0; }
.chat-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.online-dot {
    position: absolute; right: 2px; bottom: 2px;
    width: 12px; height: 12px; border-radius: 50%;
    background: #4caf50; border: 2px solid #fff;
}
.chat-body { flex: 1; min-width: 0; }
.chat-head { display: flex; justify-content: space-between; align-items: baseline; }
.chat-head strong { color: var(--maroon, #7B2D3E); font-size: 14px; }
.chat-head small { font-size: 11px; }
.chat-preview {
    color: var(--muted, #8a8a8a); font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============ MATCH TILES ============ */
.match-tile {
    display: block; background: #fff;
    border-radius: 12px; overflow: hidden;
    text-decoration: none; color: inherit;
    box-shadow: 0 1px 8px rgba(0,0,0,.05);
    transition: transform .15s, box-shadow .15s;
    border: 1px solid #f4ecdf;
}
.match-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    color: inherit;
    border-color: var(--gold, #D4AF37);
}
.match-photo { position: relative; }
.match-photo img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.match-ribbon {
    position: absolute; top: 8px; right: 8px;
    background: rgba(255,255,255,.9); border-radius: 50%;
    width: 28px; height: 28px; display: grid; place-items: center;
    font-size: 14px;
}
.match-body { padding: 10px 12px; }
.match-body strong { display: block; color: var(--maroon, #7B2D3E); font-size: 14px; }
.match-badges { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.mini-badge {
    font-size: 10px; padding: 2px 7px; border-radius: 999px; font-weight: 600;
}

/* ============ QUICK ACTIONS ============ */
.quick-actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.qa-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 12px 8px; border-radius: 10px;
    text-decoration: none; color: var(--ink, #2C2C2C);
    background: #faf6f1;
    transition: background .15s, transform .15s;
    text-align: center;
}
.qa-item:hover {
    background: var(--rose-soft);
    transform: translateY(-2px);
    color: var(--maroon, #7B2D3E);
}
.qa-item span:last-child { font-size: 12px; font-weight: 600; }
.qa-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: grid; place-items: center; font-size: 16px;
}
.text-rose { color: #B76E79 !important; }
.bg-rose-subtle { background: var(--rose-soft) !important; }

/* ============ NOTIFICATIONS ============ */
.notif-row {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 6px; border-radius: 8px;
    text-decoration: none; color: inherit;
    border-bottom: 1px solid #f4ecdf;
    transition: background .15s;
}
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: #faf6f1; color: inherit; }
.notif-row.unread { background: #fffaf2; }
.notif-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #d0d0d0; margin-top: 6px; flex-shrink: 0;
}
.notif-row.unread .notif-dot { background: #B76E79; }
.notif-msg { font-size: 13px; color: var(--ink, #2C2C2C); }

/* ============ FOOTER ============ */
.dash-footer {
    text-align: center; padding: 22px 0;
    color: var(--muted, #8a8a8a); font-size: 13px;
}

/* ============ MOBILE ============ */
.dash-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 1035;
    opacity: 0; transition: opacity .25s;
}

@media (max-width: 991.98px) {
    .dash-sidebar { transform: translateX(-100%); }
    .dash-main { margin-left: 0; }
    body.sidebar-open .dash-sidebar { transform: translateX(0); }
    body.sidebar-open .dash-overlay { display: block; opacity: 1; }
}

@media (max-width: 575.98px) {
    .dash-content { padding: 16px; }
    .welcome-banner { padding: 16px; }
    .wb-avatar { width: 48px; height: 48px; }
    .welcome-banner h2 { font-size: 18px; }
    .quick-actions { grid-template-columns: 1fr; }
    .stat-card { padding: 12px; }
    .sc-icon { width: 40px; height: 40px; font-size: 18px; }
    .sc-value { font-size: 18px; }
}

/* ============ NOTIFICATIONS ============ */
.notif-item {
    border: none !important;
    padding: 14px 18px;
    transition: background .15s;
}
.notif-item:hover {
    background: #faf6f1 !important;
}
.notif-unread {
    background: #fffaf2 !important;
}
.notif-icon-wrap {
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; flex-shrink: 0;
    background: #f4ecdf;
    font-size: 18px;
}
.notif-icon-wrap.text-primary { background: #e6eef7; }
.notif-icon-wrap.text-success { background: #e6f4ea; }
.notif-icon-wrap.text-danger  { background: #fdecea; }
.notif-icon-wrap.text-warning { background: #f8efd6; }
.notif-icon-wrap.text-info    { background: #e6f7f7; }
.notif-icon-wrap.text-secondary { background: #f0f0f0; }

.notif-text {
    font-size: 14px;
    color: var(--ink, #2C2C2C);
    line-height: 1.4;
    margin-bottom: 2px;
}
.notif-item .min-w-0 { min-width: 0; }
.notif-item .badge { font-size: 10px; padding: 3px 8px; }

@media (max-width: 575.98px) {
    .notif-item { padding: 12px 14px; }
    .notif-icon-wrap { width: 36px; height: 36px; font-size: 16px; }
    .notif-text { font-size: 13px; }
}
/* ============ PROFILE EDIT ============ */
.profile-edit-avatar {
    width: 120px; height: 120px; border-radius: 50%;
    object-fit: cover; border: 3px solid var(--gold, #D4AF37);
    box-shadow: 0 4px 16px rgba(212,175,55,.25);
}

.dash-content .form-label {
    font-size: 13px; font-weight: 600; color: var(--maroon, #7B2D3E);
    margin-bottom: 4px;
}
.dash-content .form-control,
.dash-content .form-select {
    border: 1px solid var(--line, #eadfd6);
    border-radius: 10px; padding: 10px 12px; font-size: 14px;
}
.dash-content .form-control:focus,
.dash-content .form-select:focus {
    border-color: var(--rose, #B76E79);
    box-shadow: 0 0 0 3px rgba(183,110,121,.15);
}
.dash-content textarea.form-control {
    font-family: inherit; resize: vertical;
}
.dash-content .btn-outline-danger {
    color: var(--maroon, #7B2D3E);
    border-color: var(--maroon, #7B2D3E);
}
.dash-content .btn-outline-danger:hover {
    background: var(--maroon, #7B2D3E); color: #fff;
}

@media (max-width: 575.98px) {
    .profile-edit-avatar { width: 88px; height: 88px; }
}
/* ============ PRIVACY SETTINGS ============ */
.preset-card {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #faf6f1;
    text-decoration: none; color: var(--ink, #2C2C2C);
    border: 2px solid transparent;
    transition: all .15s;
    height: 100%;
}
.preset-card:hover {
    transform: translateY(-2px);
    color: var(--maroon, #7B2D3E);
    border-color: var(--rose, #B76E79);
    background: #fff;
    box-shadow: 0 4px 14px rgba(183,110,121,.15);
}
.preset-open:hover      { border-color: #8FA68E; background: #f6faf6; }
.preset-balanced:hover  { border-color: #D4AF37; background: #fffaf2; }
.preset-guarded:hover   { border-color: #B76E79; background: #fdf7f7; }

.preset-card .pc-icon {
    font-size: 28px; flex-shrink: 0;
    width: 48px; height: 48px; border-radius: 12px;
    display: grid; place-items: center;
    background: #fff;
}
.preset-card .pc-text strong {
    display: block; color: var(--maroon, #7B2D3E); font-size: 14px;
}
.preset-card .pc-text small {
    color: var(--muted, #8a8a8a); font-size: 12px; line-height: 1.3;
}

/* Legend */
.legend-item { display: flex; gap: 10px; align-items: flex-start; }
.legend-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: grid; place-items: center; font-size: 16px;
    flex-shrink: 0;
}
.legend-green { background: #e6f4ea; color: #1e7b3a; }
.legend-blue  { background: #e6eef7; color: #2c5f8a; }
.legend-gold  { background: #f8efd6; color: #7a5a12; }
.legend-rose  { background: #f9ebec; color: #B76E79; }

/* Privacy rows */
.privacy-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #f4ecdf;
    flex-wrap: wrap;
}
.privacy-row:last-child { border-bottom: none; }
.privacy-row-info { flex: 1 1 260px; min-width: 0; }
.privacy-row-info strong { color: var(--maroon, #7B2D3E); font-size: 14px; }
.privacy-row-info small { font-size: 12px; line-height: 1.4; }

.privacy-row-options {
    display: flex; gap: 6px; flex-wrap: wrap;
}

.privacy-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px; font-weight: 600;
    background: #faf6f1;
    color: var(--muted, #8a8a8a);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all .15s;
    user-select: none;
}
.privacy-pill:hover { background: #f0e7dd; }
.privacy-pill input { display: none; }
.privacy-pill i { font-size: 13px; }

.privacy-pill.active { color: #fff; border-color: transparent; }

.privacy-public.active     { background: #8FA68E; }
.privacy-followers.active  { background: #4c7fb3; }
.privacy-premium.active    { background: linear-gradient(135deg, #D4AF37, #b8901a); }
.privacy-private.active    { background: #B76E79; }

/* Sticky save bar */
.privacy-sticky-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 -4px 14px rgba(0,0,0,.06);
    margin: 0 -24px -24px;
    z-index: 5;
}

@media (max-width: 991.98px) {
    .privacy-sticky-actions {
        margin: 0 -16px -16px;
        padding: 12px 16px;
    }
}

@media (max-width: 575.98px) {
    .privacy-row { padding: 14px 16px; }
    .privacy-pill { padding: 5px 10px; font-size: 11px; }
    .privacy-pill span { display: none; }
    .privacy-pill i { font-size: 15px; }
    .privacy-pill.active span { display: inline; }
}
/* ============ FOLLOWERS / FOLLOWING ROWS ============ */
.follower-row {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px !important;
    border: none !important;
    border-bottom: 1px solid #f4ecdf !important;
    transition: background .15s;
}
.follower-row:last-child { border-bottom: none !important; }
.follower-row:hover { background: #faf6f1; }

.follower-left {
    display: flex; gap: 14px; align-items: center;
    flex: 1 1 auto; min-width: 0;
}

.follower-avatar {
    position: relative; flex-shrink: 0;
    display: block;
}
.follower-avatar img {
    width: 56px; height: 56px; border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f4ecdf;
    transition: border-color .15s;
}
.follower-avatar:hover img {
    border-color: var(--rose, #B76E79);
}
.follower-avatar .online-dot {
    position: absolute; right: 2px; bottom: 2px;
    width: 12px; height: 12px; border-radius: 50%;
    background: #4caf50; border: 2px solid #fff;
}

.follower-info {
    min-width: 0; flex: 1;
}
.follower-info strong {
    font-size: 15px;
    transition: color .15s;
}
.follower-info strong:hover { color: var(--rose, #B76E79) !important; }
.follower-info .mini-badge {
    font-size: 10px; padding: 2px 7px; border-radius: 999px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 3px;
}

.follower-actions {
    display: flex; gap: 6px; flex-shrink: 0;
}
.follower-actions .btn { font-size: 12px; padding: 5px 10px; }
.follower-actions .btn-outline-secondary { border-radius: 8px; padding: 5px 9px; }

.follower-meta {
    flex-shrink: 0; font-size: 11px;
    min-width: 70px; text-align: right;
}

/* Mobile */
@media (max-width: 767.98px) {
    .follower-row {
        flex-wrap: wrap;
        padding: 14px 16px !important;
        gap: 12px;
    }
    .follower-avatar img { width: 48px; height: 48px; }
    .follower-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .follower-actions .follow-back-btn { flex: 1; }
    .follower-info strong { font-size: 14px; }
}
/* ============ PHOTO MANAGER ============ */

/* Drop zone (desktop + mobile) */
.photo-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 44px 24px;
    border: 2px dashed #eadfd6;
    border-radius: 14px;
    background: #faf6f1;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
    width: 100%;
    margin: 0;
}
.photo-dropzone:hover,
.photo-dropzone.dragover {
    border-color: #B76E79;
    background: #fffaf2;
    transform: scale(1.005);
}
.photo-dropzone i {
    font-size: 44px;
    color: #B76E79;
    line-height: 1;
}
.photo-dropzone strong {
    color: #7B2D3E;
    font-size: 16px;
    font-weight: 600;
    margin-top: 4px;
}
.photo-dropzone span {
    display: block;
    max-width: 400px;
    line-height: 1.5;
}
.photo-dropzone input[type=file] {
    display: none;
}

/* Camera variant (mobile) */
.photo-dropzone-camera {
    background: linear-gradient(135deg, #f9ebec, #fffaf2);
    border-color: #D4AF37;
}
.photo-dropzone-camera i { color: #D4AF37; }
.photo-dropzone-camera strong { color: #7a5a12; }

/* Preview */
.photo-preview-wrap {
    margin-top: 20px;
    position: relative;
    display: inline-block;
}
.photo-preview-img {
    max-width: 240px;
    max-height: 240px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    display: block;
}
.photo-preview-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #C0392B;
    color: #fff;
    border: 2px solid #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(192,57,43,.35);
}
.photo-preview-remove:hover {
    background: #a5271a;
}

/* Upload tabs */
#uploadTabs .nav-link {
    border-radius: 10px;
    color: #7B2D3E;
    background: #faf6f1;
    border: 1px solid #f4ecdf;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
}
#uploadTabs .nav-link.active {
    background: #7B2D3E;
    color: #fff;
    border-color: #7B2D3E;
}
#uploadTabs .nav-link i { margin-right: 4px; }

/* Album section */
.album-section { animation: fadeUp .3s ease; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.album-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f4ecdf;
}
.album-header h5 { color: #7B2D3E; font-size: 16px; }

/* Photo card */
.photo-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    transition: transform .15s, box-shadow .15s;
    border: 1px solid #f4ecdf;
}
.photo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    border-color: #D4AF37;
}
.photo-card-img {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f4ecdf;
}
.photo-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    cursor: zoom-in;
    transition: transform .3s;
}
.photo-card-img img:hover { transform: scale(1.05); }
.photo-privacy-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 13px;
    color: #fff;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.3);
}
.photo-privacy-badge.privacy-public    { background: #8FA68E; }
.photo-privacy-badge.privacy-followers { background: #4c7fb3; }
.photo-privacy-badge.privacy-premium   { background: linear-gradient(135deg, #D4AF37, #b8901a); }
.photo-privacy-badge.privacy-private   { background: #B76E79; }
.photo-card-caption {
    padding: 8px 10px;
    font-size: 12px;
    color: #2C2C2C;
    background: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.photo-card-actions {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    background: #faf6f1;
    align-items: center;
}
.photo-privacy-form { flex: 1; }
.photo-privacy-form .form-select {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
}
.photo-card-actions .btn {
    padding: 5px 8px;
    font-size: 12px;
}
.photo-card-time {
    padding: 6px 10px;
    font-size: 11px;
    color: #8a8a8a;
    background: #fff;
    border-top: 1px solid #f4ecdf;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 2000;
    padding: 24px;
    cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 92vw;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    cursor: default;
}
.lightbox-caption {
    color: #fff;
    margin-top: 14px;
    font-size: 14px;
    text-align: center;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 18px;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }

/* Mobile */
@media (max-width: 767.98px) {
    .photo-dropzone { padding: 32px 16px; }
    .photo-dropzone i { font-size: 38px; }
    .photo-dropzone strong { font-size: 15px; }
    .photo-preview-img { max-width: 200px; max-height: 200px; }
    .photo-privacy-badge { width: 24px; height: 24px; font-size: 11px; }
    .photo-card-caption { font-size: 11px; padding: 6px 8px; }
    #uploadTabs .nav-link { padding: 7px 12px; font-size: 13px; }
}
/* ============ UPLOAD PREVIEW GRID ============ */
.upload-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.upload-preview-grid:empty { margin-top: 0; }

.upload-tile {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f4ecdf;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    animation: tileIn .25s ease;
}
@keyframes tileIn {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}
.upload-tile img,
.upload-tile video {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    background: #f4ecdf;
}
.upload-tile-unknown {
    width: 100%;
    aspect-ratio: 1/1;
    display: grid;
    place-items: center;
    font-size: 42px;
    color: #c9b8a8;
    background: #f4ecdf;
}
.upload-tile-play {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0,0,0,.65);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 16px;
    pointer-events: none;
}
.upload-tile-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(192,57,43,.9);
    color: #fff;
    border: 2px solid #fff;
    display: grid;
    place-items: center;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    transition: transform .15s;
}
.upload-tile-remove:hover { transform: scale(1.1); background: #C0392B; }

.upload-tile-info {
    padding: 6px 8px;
    background: #fff;
    font-size: 11px;
    border-top: 1px solid #f4ecdf;
}
.upload-tile-name {
    color: #7B2D3E;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}
.upload-tile-size { color: #8a8a8a; }

/* ============ UPLOAD PROGRESS ============ */
.upload-progress-wrap {
    margin-top: 16px;
}
.upload-progress-bar {
    height: 10px;
    background: #f4ecdf;
    border-radius: 999px;
    overflow: hidden;
}
.upload-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #B76E79, #D4AF37);
    transition: width .2s ease;
    border-radius: 999px;
}
.upload-progress-text {
    margin-top: 6px;
    font-size: 13px;
    color: #7B2D3E;
    text-align: center;
    font-weight: 600;
}

/* ============ VIDEO BADGE IN GALLERY ============ */
.photo-video-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0,0,0,.65);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 16px;
    pointer-events: none;
    backdrop-filter: blur(4px);
}
.photo-card-img video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    background: #000;
}

/* LIGHTBOX video content */
#lightboxContent video {
    max-width: 92vw;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

/* Mobile compact */
@media (max-width: 575.98px) {
    .upload-preview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .upload-tile-info { padding: 5px 6px; font-size: 10px; }
    .upload-tile-remove { width: 24px; height: 24px; font-size: 10px; }
    .upload-tile-play { width: 26px; height: 26px; font-size: 14px; }
}
/* ============ ADDRESS TABS ============ */
.address-tabs .nav-link {
    border-radius: 12px;
    background: #faf6f1;
    color: #7B2D3E;
    border: 1px solid #f4ecdf;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    position: relative;
    transition: all .15s;
}
.address-tabs .nav-link:hover {
    background: #f0e7dd;
    color: #7B2D3E;
}
.address-tabs .nav-link.active {
    background: linear-gradient(135deg, #B76E79, #7B2D3E);
    color: #fff;
    border-color: #7B2D3E;
    box-shadow: 0 4px 14px rgba(183,110,121,.3);
}
.address-tabs .nav-link i { margin-right: 6px; }

.tab-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D4AF37;
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: 0 0 0 3px rgba(212,175,55,.25);
    animation: tabDotPulse 2s infinite;
}
@keyframes tabDotPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .5; }
}
.address-tabs .nav-link.active .tab-dot {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,.25);
}

/* ============ DUAL NATIONAL SWITCH ============ */
.dual-toggle-card {
    background: linear-gradient(135deg, #fffaf2, #f9ebec);
    border: 1px dashed #D4AF37;
    border-radius: 12px;
    padding: 14px 18px;
}
.dual-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    user-select: none;
    margin: 0;
}
.dual-toggle input { display: none; }
.dual-switch {
    position: relative;
    width: 48px;
    height: 26px;
    border-radius: 999px;
    background: #eadfd6;
    flex-shrink: 0;
    transition: background .2s;
}
.dual-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    transition: transform .25s;
}
.dual-toggle input:checked + .dual-switch {
    background: linear-gradient(135deg, #D4AF37, #b8901a);
}
.dual-toggle input:checked + .dual-switch::after {
    transform: translateX(22px);
}
.dual-label strong {
    display: block;
    color: #7B2D3E;
    font-size: 14px;
}
.dual-label small {
    color: #8a8a8a;
    font-size: 12px;
}

/* ============ PRIMARY ADDRESS SELECTOR ============ */
.primary-address-card {
    background: #faf6f1;
    border-radius: 12px;
    padding: 16px 18px;
    border: 1px solid #f4ecdf;
}
.primary-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.primary-option {
    cursor: pointer;
    margin: 0;
}
.primary-option input { display: none; }
.po-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #fff;
    border: 2px solid transparent;
    text-align: center;
    transition: all .15s;
    align-items: center;
}
.po-box i {
    font-size: 22px;
    color: #B76E79;
    margin-bottom: 4px;
}
.po-box strong {
    color: #7B2D3E;
    font-size: 14px;
}
.po-box small {
    color: #8a8a8a;
    font-size: 11px;
}
.primary-option:hover .po-box {
    border-color: #f4ecdf;
}
.primary-option.active .po-box,
.primary-option input:checked ~ .po-box {
    border-color: #B76E79;
    background: linear-gradient(180deg, #fff, #fffaf2);
    box-shadow: 0 4px 14px rgba(183,110,121,.12);
}

/* Mobile */
@media (max-width: 575.98px) {
    .address-tabs .nav-link { padding: 8px 14px; font-size: 13px; }
    .primary-options { grid-template-columns: 1fr; }
    .po-box { padding: 12px; }
}
/* ============ SIDEBAR — Mobile slide-in ============ */
.dash-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: linear-gradient(180deg, #7B2D3E 0%, #5a1f2c 100%);
    color: #fff;
    z-index: 1040;
    overflow-y: auto;
    transition: transform .25s ease;
    transform: translateX(0);
}

.dash-main {
    margin-left: 260px;
    min-height: 100vh;
}

.dash-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1035;
    opacity: 0;
    transition: opacity .25s ease;
}

/* MOBILE */
@media (max-width: 991.98px) {
    .dash-sidebar {
        transform: translateX(-100%);
    }
    .dash-main {
        margin-left: 0;
    }
    body.sidebar-open .dash-sidebar {
        transform: translateX(0);
    }
    body.sidebar-open .dash-overlay {
        display: block;
        opacity: 1;
    }
    body.sidebar-open {
        overflow: hidden;    /* prevent background scroll */
    }
}