/* NRI Property Guard — Owner Web Portal styles */
:root {
  --navy-900: #06213b; --navy-800: #0b3357; --navy-700: #0f4271; --navy-600: #14548f;
  --blue-100: #e8f1fb; --blue-50: #f4f9fd;
  --teal-700: #0a6b52; --teal-600: #0e8f6b; --teal-500: #17a67e; --teal-100: #e3f7f0;
  --gold-700: #96700c; --gold-600: #b8860f; --gold-500: #d4a017; --gold-100: #fbf1d9;
  --red-600: #c62d3f; --red-100: #fbe7ea;
  --ink-900: #101820; --ink-700: #33404a; --ink-500: #5b6b76; --ink-300: #8fa0aa; --ink-100: #e4ebee; --ink-50: #f5f8f9;
  --font-display: 'Poppins','Segoe UI',system-ui,sans-serif;
  --font-body: 'Inter','Segoe UI',system-ui,sans-serif;
  --radius-sm: 8px; --radius-md: 14px; --radius-lg: 20px; --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(6,33,59,.08); --shadow-md: 0 8px 24px rgba(6,33,59,.10); --shadow-lg: 0 20px 48px rgba(6,33,59,.16);
}
* { box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body { margin:0; font-family: var(--font-body); color: var(--ink-900); background: var(--ink-50); }
h1,h2,h3,h4 { font-family: var(--font-display); color: var(--navy-900); margin: 0 0 .4em; font-weight: 600; }
a { color: var(--teal-700); text-decoration: none; }
p { color: var(--ink-700); margin: 0 0 1em; }
button { font-family: var(--font-body); }
img { max-width: 100%; }

/* ---------- Auth screen ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display:none; } }
.auth-side { background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side .brand { display:flex; align-items:center; gap:10px; font-family: var(--font-display); font-weight:700; font-size:1.2rem; }
.auth-side h2 { color: #fff; font-size: 1.8rem; max-width: 420px; }
.auth-side p { color: #b9cee2; max-width: 400px; }
.auth-side .feat { display:flex; gap:12px; align-items:flex-start; margin-bottom: 18px; }
.auth-side .feat .ic { width:34px; height:34px; border-radius:10px; background:rgba(255,255,255,.1); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.auth-main { display:flex; align-items:center; justify-content:center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .brand-m { display:none; align-items:center; gap:10px; font-family: var(--font-display); font-weight:700; font-size:1.1rem; color:var(--navy-900); margin-bottom: 24px; }
@media (max-width:900px) { .auth-card .brand-m { display:flex; } }
.auth-tabs { display:flex; gap:6px; background:var(--ink-100); border-radius: var(--radius-pill); padding:4px; margin-bottom:26px; }
.auth-tab { flex:1; text-align:center; padding:10px; border-radius: var(--radius-pill); font-weight:600; font-size:.9rem; cursor:pointer; color: var(--ink-500); }
.auth-tab.active { background:#fff; color: var(--navy-900); box-shadow: var(--shadow-sm); }
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.field { margin-bottom: 16px; }
.field label { display:block; font-size:.82rem; font-weight:600; color: var(--navy-900); margin-bottom:6px; }
input, select, textarea {
  width:100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--ink-100);
  font-size:.95rem; background:#fff; color: var(--ink-900); font-family: var(--font-body);
}
input:focus, select:focus, textarea:focus { outline:none; border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-100); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; font-family: var(--font-display); font-weight:600; font-size:.94rem; padding: 12px 22px; border-radius: var(--radius-pill); border:1.5px solid transparent; cursor:pointer; transition: all .15s ease; }
.btn-block { width:100%; }
.btn-primary { background: var(--teal-700); color:#fff; }
.btn-primary:hover { background: #084f3d; }
.btn-primary:disabled { opacity:.6; cursor:not-allowed; }
.btn-outline { background:#fff; border-color: var(--ink-100); color: var(--navy-800); }
.btn-outline:hover { background: var(--ink-50); }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-danger-outline { background:#fff; border-color: var(--red-100); color: var(--red-600); }
.btn-sm { padding: 8px 14px; font-size:.82rem; }
.divider { display:flex; align-items:center; gap:12px; color: var(--ink-500); font-size:.8rem; margin: 18px 0; }
.divider::before, .divider::after { content:''; flex:1; height:1px; background: var(--ink-100); }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: .86rem; margin-bottom: 14px; display:none; }
.alert.show { display:block; }
.alert.error { background: var(--red-100); color: var(--red-600); }
.alert.success { background: var(--teal-100); color: var(--teal-700); }
.alert.info { background: var(--blue-100); color: var(--navy-700); }
.tier-picker { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:16px; }
.tier-opt { border: 1.5px solid var(--ink-100); border-radius: var(--radius-md); padding: 14px; cursor:pointer; position:relative; }
.tier-opt.selected { border-color: var(--teal-500); background: var(--teal-100); }
.tier-opt b { display:block; font-family: var(--font-display); font-size:.98rem; }
.tier-opt span { font-size:.78rem; color: var(--ink-500); }
.tier-opt .badge { position:absolute; top:-9px; right:10px; background: var(--gold-500); color:var(--navy-900); font-size:.66rem; font-weight:700; padding:2px 8px; border-radius: var(--radius-pill); }
.otp-row { display:flex; gap:10px; }
.otp-row input { letter-spacing: .3em; text-align:center; font-weight:700; font-size:1.1rem; }
.help-note { font-size:.78rem; color: var(--ink-500); margin-top: 4px; }
.legal-note { font-size: .76rem; color: var(--ink-500); margin-top: 20px; text-align:center; }

/* ---------- Dashboard app shell ---------- */
.app-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
@media (max-width: 920px) { .app-shell { grid-template-columns: 1fr; } }
.sidebar { background: var(--navy-900); color: #cfe1f2; padding: 22px 16px; display:flex; flex-direction:column; position: sticky; top:0; height:100vh; overflow-y:auto; }
@media (max-width: 920px) { .sidebar { position: fixed; z-index: 400; width: 250px; height:100vh; transform: translateX(-100%); transition: transform .2s ease; } .sidebar.open { transform: translateX(0); } }
.sidebar .brand { display:flex; align-items:center; gap:10px; color:#fff; font-family: var(--font-display); font-weight:700; font-size:1.05rem; padding: 8px 10px 22px; }
.side-nav { list-style:none; padding:0; margin:0; flex-grow:1; }
.side-nav li { margin-bottom: 4px; }
.side-nav a { display:flex; align-items:center; gap:12px; padding: 11px 14px; border-radius: 10px; color:#b9cee2; font-size:.9rem; font-weight:500; cursor:pointer; }
.side-nav a:hover { background: rgba(255,255,255,.06); color:#fff; }
.side-nav a.active { background: var(--teal-600); color:#fff; }
.side-nav .badge-count { margin-left:auto; background: var(--red-600); color:#fff; font-size:.68rem; font-weight:700; padding: 1px 7px; border-radius: var(--radius-pill); }
.side-foot { border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; margin-top: 10px; }
.side-foot button { width:100%; }

.topbar-app { position: sticky; top:0; z-index:200; background:#fff; border-bottom:1px solid var(--ink-100); padding: 14px 26px; display:flex; align-items:center; justify-content:space-between; gap: 14px; }
.topbar-app .menu-btn { display:none; background:none; border:none; cursor:pointer; }
@media (max-width:920px) { .topbar-app .menu-btn { display:block; } }
.topbar-title { font-family: var(--font-display); font-weight:600; font-size:1.15rem; color: var(--navy-900); }
.topbar-right { display:flex; align-items:center; gap:16px; }
.avatar-chip { width:36px; height:36px; border-radius:50%; background: var(--navy-700); color:#fff; display:flex; align-items:center; justify-content:center; font-family: var(--font-display); font-weight:700; font-size:.9rem; }
.main-app { padding: 26px; max-width: 1180px; }
.view { display:none; }
.view.active { display:block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from{opacity:0; transform:translateY(4px);} to{opacity:1; transform:none;} }

.dash-grid { display:grid; grid-template-columns: repeat(4,1fr); gap:18px; margin-bottom: 26px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .dash-grid { grid-template-columns: 1fr; } }
.stat-card { background:#fff; border:1px solid var(--ink-100); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); }
.stat-card .lbl { font-size:.78rem; color: var(--ink-500); font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.stat-card .val { font-family: var(--font-display); font-size:1.7rem; font-weight:700; color: var(--navy-900); margin-top:6px; }

.card { background:#fff; border:1px solid var(--ink-100); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.card-head { display:flex; justify-content:space-between; align-items:center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.card-head h3 { margin:0; }

.status-chip { font-size:.72rem; font-weight:700; padding:4px 11px; border-radius: var(--radius-pill); white-space:nowrap; }
.status-submitted, .status-admin_review { background: var(--blue-100); color: var(--navy-700); }
.status-assigned_to_manager, .status-scheduled, .status-assigned { background: var(--gold-100); color: var(--gold-700); }
.status-pending_approval, .status-in_progress, .status-reached { background: var(--gold-100); color: var(--gold-700); }
.status-approved, .status-completed { background: var(--teal-100); color: var(--teal-700); }
.status-rejected, .status-revisit_requested { background: var(--red-100); color: var(--red-600); }
.status-open { background: var(--gold-100); color: var(--gold-700); }
.status-resolved, .status-closed { background: var(--teal-100); color: var(--teal-700); }
.status-draft { background: var(--ink-100); color: var(--ink-500); }
.status-cancelled, .status-disabled { background: var(--ink-100); color: var(--ink-500); }
.status-active { background: var(--teal-100); color: var(--teal-700); }
.status-due { background: var(--gold-100); color: var(--gold-700); }
.status-paid { background: var(--teal-100); color: var(--teal-700); }
.status-overdue { background: var(--red-100); color: var(--red-600); }

/* ---------- Documents & Invoices: card layout matching the mobile app ---------- */
.docinv-tabs { max-width: 340px; margin-bottom: 18px; }
.docinv-panel { display:none; }
.docinv-panel.active { display:block; }

.doc-card { display:flex; align-items:center; gap:14px; background:#fff; border:1px solid var(--ink-100); border-radius: var(--radius-md); padding:14px 16px; margin-bottom:12px; box-shadow: var(--shadow-sm); }
.doc-icon { width:44px; height:44px; border-radius:12px; background: var(--gold-100); display:flex; align-items:center; justify-content:center; font-size:1.3rem; flex-shrink:0; }
.doc-info { flex:1; min-width:0; }
.doc-title { font-weight:600; color: var(--navy-900); }
.doc-meta { font-size:.78rem; color: var(--ink-500); margin-top:2px; }
.doc-download-btn { background: var(--blue-50); color: var(--navy-700); border:none; width:38px; height:38px; border-radius:50%; font-size:1rem; cursor:pointer; flex-shrink:0; }
.doc-download-btn:hover { background: var(--blue-100); }

.invoice-card { background:#fff; border:1px solid var(--ink-100); border-radius: var(--radius-md); padding:18px 20px; margin-bottom:14px; box-shadow: var(--shadow-sm); }
.invoice-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; }
.invoice-title { font-weight:700; color: var(--navy-900); font-size:1rem; }
.invoice-due { font-size:.8rem; color: var(--ink-500); margin-top:2px; }
.invoice-amount-col { text-align:right; flex-shrink:0; }
.invoice-amount { font-family: var(--font-display); font-weight:700; font-size:1.15rem; color: var(--navy-900); margin-bottom:6px; }
.invoice-rate { font-size:.82rem; color: var(--teal-700); background: var(--teal-100); border-radius:8px; padding:8px 10px; margin-top:12px; }
.invoice-card-foot { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:14px; flex-wrap:wrap; }

/* ---------- Staff dashboards: hero header, pipeline bar, filter chips ---------- */
.hero-header { background: linear-gradient(135deg, var(--navy-900), var(--teal-700)); color: #fff; border-radius: var(--radius-lg); padding: 26px 28px; margin-bottom: 22px; }
.hero-header h2 { color: #fff; margin-bottom: 4px; }
.hero-header p { color: #cfe1f2; margin-bottom: 0; }
.hero-header .hero-stats { display:flex; gap: 26px; margin-top: 18px; flex-wrap: wrap; }
.hero-header .hero-stats div { min-width: 100px; }
.hero-header .hero-stats .val { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.hero-header .hero-stats .lbl { font-size: .75rem; color: #b9cee2; text-transform: uppercase; letter-spacing: .03em; }

.pipeline-bar { display:flex; height: 14px; border-radius: var(--radius-pill); overflow: hidden; background: var(--ink-100); margin: 10px 0 12px; }
.pipeline-bar span { height: 100%; }
.pipeline-bar .seg-pending { background: var(--gold-500); }
.pipeline-bar .seg-progress { background: var(--navy-600); }
.pipeline-bar .seg-completed { background: var(--teal-500); }
.pipeline-legend { display:flex; gap: 16px; flex-wrap: wrap; font-size: .78rem; color: var(--ink-500); }
.pipeline-legend span.dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right: 5px; vertical-align: middle; }

.filter-chip-row { display:flex; flex-wrap:wrap; gap: 8px; margin-bottom: 18px; }
.filter-chip { background: #fff; border: 1.5px solid var(--ink-100); color: var(--ink-700); font-size: .8rem; font-weight: 600; padding: 7px 14px; border-radius: var(--radius-pill); cursor: pointer; }
.filter-chip.active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.filter-chip .cnt { opacity: .7; margin-left: 4px; }

.kv-table { width: 100%; border-collapse: collapse; }
.kv-table td { padding: 7px 4px; border-bottom: 1px solid var(--ink-100); font-size: .88rem; }
.kv-table td:first-child { color: var(--ink-500); }
.kv-table td:last-child { text-align: right; font-weight: 600; color: var(--navy-900); }

.pass-reveal { background: var(--teal-100); border: 1.5px dashed var(--teal-500); border-radius: var(--radius-md); padding: 16px; margin-top: 14px; }
.pass-reveal code { font-size: 1rem; font-weight: 700; color: var(--navy-900); user-select: all; }

.media-review-tile { border: 1px solid var(--ink-100); border-radius: var(--radius-md); overflow: hidden; }
.media-review-tile .thumb { position:relative; aspect-ratio: 4/3; background: var(--ink-100); display:flex; align-items:center; justify-content:center; font-size: 1.8rem; color: var(--ink-300); cursor: pointer; }
.media-review-tile .actions { display:flex; gap: 6px; padding: 8px; flex-wrap: wrap; }
.media-review-tile .actions .btn { flex: 1; padding: 6px 8px; font-size: .74rem; }

.prop-card { border:1px solid var(--ink-100); border-radius: var(--radius-md); padding: 18px 20px; margin-bottom: 14px; cursor:pointer; transition: box-shadow .15s ease; }
.prop-card:hover { box-shadow: var(--shadow-md); }
.prop-card .row1 { display:flex; justify-content:space-between; align-items:center; gap: 10px; margin-bottom: 6px; }
.prop-card .row1 b { font-family: var(--font-display); font-size:1rem; color: var(--navy-900); }
.prop-card .meta { font-size:.82rem; color: var(--ink-500); }
.chip-row { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.mini-chip { font-size:.72rem; background: var(--ink-50); color: var(--ink-700); padding: 3px 10px; border-radius: var(--radius-pill); }

.tier-badge { font-size:.7rem; font-weight:700; padding: 3px 10px; border-radius: var(--radius-pill); display:inline-block; }
.tier-badge.tier-prime { background: var(--gold-500); color: var(--navy-900); }
.tier-badge.tier-regular { background: var(--ink-100); color: var(--ink-700); }
.fin-summary-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 14px; margin: 14px 0; }
.fin-summary-grid .stat-card .val.paid { color: var(--teal-700, #0a6b52); }
.fin-summary-grid .stat-card .val.due { color: var(--red-600, #c62d3f); }

.timeline-mini { list-style:none; padding:0; margin: 14px 0 0; }
.timeline-mini li { position:relative; padding: 8px 0 8px 22px; font-size:.86rem; border-left: 2px solid var(--ink-100); margin-left: 5px; }
.timeline-mini li::before { content:''; position:absolute; left:-6px; top:11px; width:10px; height:10px; border-radius:50%; background: var(--teal-500); }
.timeline-mini li:last-child { border-left-color: transparent; }

.media-grid { display:grid; grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); gap: 12px; margin-top: 12px; }
.media-tile { position:relative; border-radius: 10px; overflow:hidden; aspect-ratio: 4/3; background: var(--ink-100); display:flex; align-items:center; justify-content:center; color: var(--ink-300); font-size: 1.6rem; cursor:pointer; }
.media-tile img, .media-tile video { width:100%; height:100%; object-fit:cover; }
.lightbox-cap { margin-top: 8px; padding: 8px 10px; background: var(--ink-50, #f4f7f9); border-radius: 8px; font-size: .82rem; color: var(--ink-500); text-align:center; }

/* Phase 8: the on-media timestamp/GPS overlay (N.geoStamp, .geo-stamp /
   .geo-stamp-compact) was removed at the user's explicit request — GPS and
   capture time are still recorded on every media row for the audit trail,
   they're just no longer drawn on top of the photo/video anywhere. The fixed
   min-height below is kept regardless: it's what keeps the lightbox a stable,
   non-collapsing size while media loads. */
.lightbox-media-wrap { position: relative; min-height: 220px; background: var(--ink-100); border-radius: 10px; overflow: hidden; }
.lightbox-media-wrap img, .lightbox-media-wrap video { display:block; width:100%; min-height:220px; object-fit: contain; border-radius:10px; }
.prop-thumb { width:100%; aspect-ratio: 16/9; border-radius: 10px; overflow:hidden; background: var(--ink-100); display:flex; align-items:center; justify-content:center; color: var(--ink-300); font-size: 1.8rem; margin-bottom: 10px; }
.prop-thumb img { width:100%; height:100%; object-fit:cover; }

.empty-state { text-align:center; padding: 46px 20px; color: var(--ink-500); }
.empty-state .ic { font-size:2.4rem; margin-bottom: 10px; }

.table-simple { width:100%; border-collapse: collapse; }
.table-simple th, .table-simple td { text-align:left; padding: 11px 8px; border-bottom: 1px solid var(--ink-100); font-size:.88rem; }
.table-simple th { color: var(--ink-500); font-weight:600; font-size:.76rem; text-transform:uppercase; letter-spacing:.03em; }
.table-simple tbody tr[data-visit-id]:hover, .table-simple tbody tr.visit-row:hover { background: var(--blue-50); }

.checklist-view { list-style:none; padding:0; margin: 8px 0; }
.checklist-view li { padding: 5px 0; font-size:.9rem; }

.new-reply-badge { background: var(--red-600); color:#fff; font-size:.68rem; font-weight:700; padding: 2px 9px; border-radius: var(--radius-pill); margin-left:8px; }

.notif-item { display:flex; gap:12px; padding: 13px 4px; border-bottom:1px solid var(--ink-100); }
.notif-item.unread { background: var(--blue-50); }
.notif-item .ic { width:34px; height:34px; border-radius:50%; background: var(--teal-100); color: var(--teal-700); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.notif-item b { display:block; font-size:.9rem; }
.notif-item span.time { font-size:.74rem; color: var(--ink-500); }

.ticket-chip-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom: 14px; }
.preset-chip { background: var(--blue-100); color: var(--navy-700); border:none; font-size:.8rem; font-weight:600; padding: 8px 14px; border-radius: var(--radius-pill); cursor:pointer; }
.preset-chip:hover { background: var(--navy-700); color:#fff; }
.reply-thread { border-left: 2px solid var(--ink-100); margin-left: 4px; padding-left: 16px; }
.reply-bubble { background: var(--ink-50); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.reply-bubble.me { background: var(--teal-100); }
.reply-bubble .who { font-size:.72rem; font-weight:700; color: var(--navy-700); margin-bottom:4px; }

.upgrade-banner { background: linear-gradient(120deg, var(--gold-500), #eac35a); border-radius: var(--radius-md); padding: 22px 26px; display:flex; justify-content:space-between; align-items:center; gap: 16px; flex-wrap:wrap; color: var(--navy-900); }
.upgrade-banner h3 { color: var(--navy-900); margin-bottom:2px; }

.sos-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:12px; }
@media (max-width:600px) { .sos-grid { grid-template-columns: repeat(2,1fr); } }
.sos-opt { border: 1.5px solid var(--ink-100); border-radius: var(--radius-md); padding: 16px; text-align:center; cursor:pointer; }
.sos-opt.selected { border-color: var(--red-600); background: var(--red-100); }
.sos-opt .em { font-size: 1.7rem; display:block; margin-bottom:6px; }

.modal-backdrop { position:fixed; inset:0; background: rgba(6,33,59,.55); display:none; align-items:center; justify-content:center; z-index: 800; padding: 20px; }
.modal-backdrop.open { display:flex; }
.modal { background:#fff; border-radius: var(--radius-lg); padding: 28px; max-width: 560px; width:100%; max-height: 88vh; overflow-y:auto; }
.modal .modal-head { display:flex; justify-content:space-between; align-items:center; margin-bottom: 18px; }
.modal .modal-head button { background:none; border:none; font-size:1.4rem; cursor:pointer; color: var(--ink-500); }

/* Lightbox modal (photo/video viewer): a fixed, comfortable box sized off
   the viewport rather than the media's natural size, so a tall portrait
   photo or a wide video never grows the box into a scrollbar — it's
   always scaled to fit inside via object-fit:contain instead. Capped so
   it stays a sane size on large desktop monitors too. */
.lightbox-modal { display:flex; flex-direction:column; width:min(94vw,920px); max-width:min(94vw,920px); height:min(88vh,720px); max-height:min(88vh,720px); padding:10px; overflow:hidden; }
.lightbox-modal .modal-head { flex-shrink:0; margin-bottom:6px; }
.lightbox-modal .lightbox-actions { display:flex; align-items:center; gap:2px; }
.lightbox-modal .lightbox-actions button:hover { color: var(--navy-900); }
#lightboxBody { flex:1; min-height:0; display:flex; flex-direction:column; }
.lightbox-modal .lightbox-media-wrap { flex:1; min-height:0; display:flex; align-items:center; justify-content:center; }
.lightbox-modal .lightbox-media-wrap img, .lightbox-modal .lightbox-media-wrap video { width:auto; height:auto; max-width:100%; max-height:100%; min-height:0; object-fit:contain; }
.lightbox-modal .lightbox-cap { flex-shrink:0; }

/* "Maximize" — a much larger view without giving up the fixed-size /
   no-scroll layout above, just at a bigger scale. This is also the
   fallback applied when the real Fullscreen API isn't available or is
   denied (e.g. inside a sandboxed iframe), so the button always does
   something visible. */
.lightbox-modal.is-maximized { width:98vw; max-width:98vw; height:96vh; max-height:96vh; }
.lightbox-modal:fullscreen, .lightbox-modal:-webkit-full-screen { width:100vw; max-width:100vw; height:100vh; max-height:100vh; border-radius:0; background:#0b1f33; }
.lightbox-modal:fullscreen .lightbox-media-wrap, .lightbox-modal:-webkit-full-screen .lightbox-media-wrap { background:#0b1f33; }

.loading-spin { display:inline-block; width:16px; height:16px; border:2px solid rgba(255,255,255,.4); border-top-color:#fff; border-radius:50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, var(--ink-100) 25%, #f0f4f5 37%, var(--ink-100) 63%); background-size: 400% 100%; animation: skel 1.4s ease infinite; border-radius: 8px; height: 16px; }
@keyframes skel { 0%{background-position:100% 50%;} 100%{background-position:0 50%;} }
.form-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap: 0 16px; }
@media (max-width:560px) { .form-grid-2 { grid-template-columns:1fr; } }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--navy-900); color:#fff; padding: 13px 22px; border-radius: var(--radius-pill); font-size:.88rem; box-shadow: var(--shadow-lg); opacity:0; pointer-events:none; transition: all .2s ease; z-index: 1000; max-width: 90vw; text-align:center; }
.toast.show { opacity:1; transform: translate(-50%, 0); }
.toast.error { background: var(--red-600); }
.toast.success { background: var(--teal-700); }
