:root{
  --brand-1:#e60000; --brand-2:#b30000; --brand-3:#960000; --brand-4:#850000; --brand-5:#6c0000;
  --text-strong:#0f172a; --text:#111827; --text-muted:#64748b;
  --bg:#f4f7fa; --panel:#fefefe; --panel-soft:#f8fafc; --border:#e5e7eb;
  --warn:#ffd400;
  --tool-on:#1d4ed8; --tool-on-fg:#fff;
  --hdr-grad: linear-gradient(180deg,#fff5f5 0%,#ffecec 100%);
  --active-row:#fff7f7;
  --active-row-border:#ffd7d7;
  --drag-hover:#eef6ff;
  --disabled:#9ca3af;
}

*{ box-sizing:border-box; }

html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); }
#map { height: 100vh; width: 100vw; position: relative; }

/* Make top-left controls sit NEXT TO each other (zoom + geocoder) */
.leaflet-top.leaflet-left{
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  gap:8px;
}
.leaflet-top.leaflet-left .leaflet-control{ float:none; }

/* Info panel (sidebar) */
#infoPanel {
  position: fixed; top: 0; right: 0; width: 360px; max-width: 85vw; height: 100vh;
  background: var(--panel); box-shadow: -4px 0 18px rgba(0,0,0,.15);
  transform: translateX(100%);
  transition: transform 180ms ease-in-out;
  z-index: 1000; display: flex; flex-direction: column; border-left: 1px solid var(--border);
  font: 14px/1.5 system-ui;
}
#infoPanel.open { transform: translateX(0); }
#infoHeader {
  padding: 10px 12px; display:flex; align-items:center; gap:10px;
  border-bottom:1px solid var(--border); background: var(--hdr-grad);
  color:#520000; font: 800 13px/1.2 system-ui;
}
#infoHeader .title-icon { width:16px; height:16px; color: var(--brand-2); display:block; overflow:visible; }

/* Shared caret-button */
.caret-btn{
  border:1px solid var(--border); background:#fff; border-radius:8px; padding:2px 6px; cursor:pointer;
  display:flex; align-items:center; gap:6px;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  text-decoration: none;
  color: inherit;
}
.caret-btn:hover{ box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.caret-btn svg { width:14px; height:14px; color: var(--brand-3); display:block; overflow:visible; }

#infoBody { padding: 12px 14px; overflow:auto; background: var(--panel-soft); }
table.kv { border-collapse: collapse; width: 100%; }
table.kv th, table.kv td { text-align: left; padding: 6px 4px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
table.kv th { width: 38%; color: #334155; font-weight: 700; }
.muted { color: var(--text-muted); }

/* Floating launcher */
#infoTab {
  position: fixed; right: 12px; top: 120px;
  z-index: 1001; display: flex; align-items: center; gap: 10px;
  background: var(--hdr-grad);
  border: 1px solid var(--border); color:#520000;
  border-radius: 12px; padding: 10px 12px; cursor: default;
  font: 800 13px/1.1 system-ui; white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0,0,0,.15);
}
#infoTab .label { display:flex; align-items:center; gap:8px; }
#infoTab .label svg { width:16px; height:16px; color: var(--brand-2); display:block; overflow:visible; }
#infoTab .vr-toggle { margin-left: 8px; }
#infoPanel.open ~ #infoTab { display:none; }

/* Selected marker */
.feature-sel {
  width:12px; height:12px; margin-left:-6px; margin-top:-6px;
  background: var(--warn); border:2px solid #111; box-shadow:0 0 0 2px rgba(0,0,0,.25);
}

/* Measure labels & dots */
.measure-label {
  display:inline-block; background:#fff; border:1px solid var(--border);
  border-radius:6px; padding:2px 6px; box-shadow: 0 2px 6px rgba(0,0,0,.15);
  font: 12px system-ui; color:#111827; white-space:nowrap;
  transform:translate(8px,-8px);
}
.measure-dot {
  width:8px; height:8px; margin-left:-4px; margin-top:-4px; border-radius:50%;
  background:#111827; border:2px solid #fff; box-shadow:0 0 0 1px rgba(0,0,0,.15);
}

/* Bottom-left logo */
.leaflet-control.map-logo-control {
  background: transparent; border: none; box-shadow: none; padding: 0 0 10px 10px;
}
.map-logo { display: block; width: auto; height: auto; pointer-events: auto; }

/* —— Control box —— */
.vr-control {
  background: #ffffff; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0,0,0,.15);
  min-width: 280px; max-width: 20vw;
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
}
.vr-header {
  display:flex; align-items:center; gap:8px; padding: 10px 12px;
  background: var(--hdr-grad); border-bottom: 1px solid var(--border);
  color:#520000; font: 800 13px/1.1 system-ui;
}
.vr-title { display:flex; align-items:center; gap:8px; }
.vr-header svg.title-icon { width:16px; height:16px; color: var(--brand-2); display:block; overflow:visible; }

/* Actions cluster on the right (My Account / Logout / caret) */
.vr-header-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:6px;
}

/* caret rotation when collapsed */
.vr-control.collapsed .vr-toggle svg { transform: rotate(180deg); }

.vr-control.collapsed .vr-body { display:none; }
.vr-body {
  padding: 10px;
  background: var(--panel-soft);
  overflow-y: auto;
  flex: 1 1 auto;
}

.vr-section {
  background:#fff; border:1px solid var(--border); border-radius:12px;
  padding:8px; margin-bottom:10px;
}
.vr-section-title {
  display:flex; align-items:center; gap:8px;
  font:700 12px/1.1 system-ui; color: #2b0b0b; margin-bottom:6px;
}
.vr-section-title svg { width:14px; height:14px; color: var(--brand-3); display:block; overflow:visible; }

.vr-list { display:flex; flex-direction:column; gap:4px; }

/* Row: stays on one line; selection paints full row */
.vr-item {
  display:flex; align-items:center; gap:8px;
  padding:6px; border-radius:8px; user-select:none;
  background:#fff; border:1px solid transparent;
}
.vr-item:hover { background:#f4f7fa; }
.vr-item.selectable.active { background: var(--active-row); border-color: var(--active-row-border); }

/* Single-line row layout + right-aligned order buttons */
.vr-overlay-row { display:flex; align-items:center; gap:10px; width:100%; }
.vr-overlay-row input[type="checkbox"] {
  width:16px; height:16px; accent-color: var(--brand-2); margin-right:8px;
}
.vr-label { font: 13px system-ui; color: var(--text); flex: 1 1 auto; }

/* Reorder ctrls */
.vr-order { margin-left:auto; display:flex; gap:4px; }
.vr-btn {
  border:1px solid var(--border); background:#fff; border-radius:8px;
  padding:3px 7px; cursor:pointer;
}
.vr-btn:hover { background:#fff0f0; border-color: var(--brand-2); }
.vr-btn[hidden]{ display:none; }
.vr-btn svg { width:12px; height:12px; color: var(--brand-3); display:block; overflow:visible; }

/* Drag & drop */
.vr-overlay-row[draggable="true"] { cursor: grab; }
.vr-overlay-row.dragging { opacity: .6; }
.vr-item.drag-over { outline: 2px dashed var(--tool-on); background: var(--drag-hover); }

/* Toolbox */
.tool-row { display:flex; flex-wrap:wrap; gap:6px; }
.tool-btn {
  display:flex; align-items:center; gap:6px;
  border:1px solid var(--border); background:#fff; color:#111827;
  border-radius:10px; padding:6px 8px; cursor:pointer; font: 12px system-ui;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tool-btn svg { width:14px; height:14px; display:block; overflow:visible; }
.tool-btn.active { background: var(--tool-on); color: var(--tool-on-fg); border-color: var(--tool-on); }
.tool-btn.active svg { color: var(--tool-on-fg); }
.tool-btn.disabled { opacity:.55; cursor:not-allowed; }
.tool-btn.disabled:hover { background:#fff; }

/* —— Refined animated swaps —— */
.tool-btn.swap-soft-blue{
  animation: selectPulse 0.4s ease both;
  background:#fff !important; color: var(--tool-on) !important; border-color: var(--tool-on) !important;
}
@keyframes selectPulse{
  0%   { background: rgba(29,78,216,0.10); padding-left:8px;  padding-right:8px;  }
  50%  { background: #fff;                 padding-left:16px; padding-right:16px; }
  100% { background: rgba(29,78,216,0.10); padding-left:8px;  padding-right:8px;  }
}

#infoHeader #infoTitle.swap-soft-red{
  animation: titlePulse 0.4s ease both;
  color: var(--brand-2) !important;
  border-radius:6px; padding:2px 4px;
}
@keyframes titlePulse{
  0%   { background: rgba(179,0,0,.10); }
  50%  { background: #fff; }
  100% { background: rgba(179,0,0,.10); }
}

/* Bottom-right widgets stack */
#bottomRightStack{
  position:absolute; right:12px; bottom:12px;
  display:flex; flex-direction:column; align-items:flex-end; gap:10px;
  z-index:600; pointer-events:none; transition: bottom .15s ease;
}
#toastsStack { display:flex; flex-direction:column; gap:10px; pointer-events:none; }

/* Toasts + loaders */
.toast {
  pointer-events:auto; display:grid; grid-auto-flow:column; align-items:center; gap:10px;
  background:#ffffff; border:1px solid var(--border); border-radius:14px;
  padding:10px 12px; min-width:260px; max-width:min(90vw,360px);
  box-shadow:0 10px 28px rgba(0,0,0,.16);
  transform:translateY(12px); opacity:0; transition:transform 220ms ease, opacity 220ms ease;
  position:relative; overflow:visible;
}
.toast.show { transform:translateY(0); opacity:1; }
.toast .icon { width:22px; height:22px; display:block; overflow:visible; }
.toast .text { font:13px/1.35 system-ui; color:var(--text); }

.toast .close{
  position:relative; border:1px solid var(--border); background:var(--panel-soft);
  border-radius:999px; padding:2px; cursor:pointer; width:22px; height:22px;
  display:flex; align-items:center; justify-content:center;
}
.toast .close svg{ width:12px; height:12px; color: var(--brand-3); display:block; overflow:visible; }
.toast .close::before{
  content:""; position:absolute; inset:-3px; border-radius:999px;
  background: conic-gradient(var(--brand-2) calc(var(--progress,0)*1%), transparent 0);
  -webkit-mask: radial-gradient(circle 12px at center, transparent 10px, #000 10px);
          mask: radial-gradient(circle 12px at center, transparent 10px, #000 10px);
  pointer-events:none;
}

/* Loader toast icon – spinner */
#aiLoader.toast .icon,
#datasetLoader.toast .icon{
  border-radius:50%;
  background: conic-gradient(var(--brand-1) 0 25%, transparent 25% 50%, var(--brand-3) 50% 75%, transparent 75% 100%);
  -webkit-mask: radial-gradient(circle 60% at 50% 50%, transparent 55%, #000 56%);
          mask: radial-gradient(circle 60% at 50% 50%, transparent 55%, #000 56%);
  animation: spin 900ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg);} }

/* Error toast variant */
.toast.error{
  background:#fff8f8;
  border-color: var(--active-row-border);
}
.toast.error .text{
  color:#520000;
}
.toast.error .icon{
  background: none;
  -webkit-mask: none; mask: none;
}

/* ---- Geocoder control (styled like .vr-control) ---- */
.vr-geocoder-control{
  min-width:auto;
  max-width:none;
  overflow:visible;
  max-height:none;
}
.vr-geocoder-control .vr-body{
  overflow: visible;
  max-height:none;
}
.vr-geocoder-form{
  position: relative;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.vr-geocoder-inputwrap{
  position: relative;
  display:flex;
  align-items:center;
  gap:6px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:6px 6px 6px 8px;
  width: 240px;
  transition: width .18s ease;
}
.vr-geocoder-input{
  flex:1 1 auto;
  min-width: 0;
  border:0;
  outline:0;
  font: 13px system-ui;
  color: var(--text);
}
.vr-geocoder-input::placeholder{ color:#9ca3af; }
.vr-geocoder-btn, .vr-geocoder-clear{
  border:1px solid var(--border);
  background:#fff;
  border-radius:8px;
  padding:6px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.vr-geocoder-btn svg, .vr-geocoder-clear svg{
  width:16px;
  height:16px;
  color: var(--brand-3);
  display:block;
  overflow:visible;
}
.vr-geocoder-btn:hover, .vr-geocoder-clear:hover{
  background:#fff0f0;
  border-color: var(--brand-2);
}
.vr-geocoder-control.busy .vr-geocoder-btn{
  opacity:.6;
  pointer-events:none;
}

/* Suggestions dropdown */
.vr-geocoder-suggestions{
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.15);
  min-width: 220px;
  max-height: 50vh;
  overflow-y:auto;
  overflow-x:hidden;
  z-index: 1200;
  padding:6px;
}
.vr-geo-item{
  display:flex;
  align-items:center;
  border-radius:8px;
  padding:6px;
  border:1px solid transparent;
  cursor:pointer;
  user-select:none;
}
.vr-geo-item .row{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
}
.vr-geo-item svg{
  width:14px;
  height:14px;
  color: var(--brand-3);
}
.vr-geo-item .vr-label{
  font: 13px/1.1 system-ui;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vr-geo-item:hover{
  background:#f4f7fa;
}
.vr-geo-item.active{
  background: var(--active-row);
  border-color: var(--active-row-border);
}

/* ============================================================
   Shared page UI (Login / My Account / Change Password / Admin)
   ============================================================ */

/* Page base */
body.vr-page{
  min-height:100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at top left, #ffecec 0, #ffecec 10%, var(--bg) 55%);
  color: var(--text);
}

/* Centered auth pages (login, change password) */
body.vr-centered{
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 1.5rem;
}

/* Top-aligned pages (account, admin) */
body.vr-top{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding: 1.5rem;
}

/* Containers */
.vr-shell{ width:100%; }
.vr-shell.narrow{ max-width: 420px; }
.vr-shell.medium{ max-width: 640px; }
.vr-shell.wide{ max-width: 920px; }
.vr-shell.admin{ max-width: 860px; }

.vr-card{
  background: var(--panel);
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  overflow:hidden;
}
.vr-card.pad{
  padding: 1.75rem 1.75rem 1.9rem;
  overflow: visible;
}
@media (max-width: 480px){
  .vr-card.pad{
    padding: 1.5rem 1.25rem 1.7rem;
    border-radius: 1rem;
  }
}

.vr-card-header{
  padding: 1.15rem 1.25rem;
  background: var(--hdr-grad);
  border-bottom: 1px solid var(--border);
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 1rem;
}
@media (max-width: 480px){
  .vr-card-header{ padding: 1rem; }
}

.vr-card-body{
  padding: 1.25rem;
  background: var(--panel-soft);
}
@media (max-width: 760px){
  .vr-card-body{ padding: 1rem; }
}

.vr-card-footer{
  padding: 1rem 1.25rem 1.15rem;
  border-top: 1px solid var(--border);
  background: #fff;
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .75rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: .82rem;
}

/* Header blocks */
.vr-header-left{
  display:flex;
  align-items:flex-start;
  gap: .85rem;
  min-width: 0;
}
.vr-header-text{ min-width:0; }
.vr-header-text h1{
  margin:0;
  font-size: 1.35rem;
  font-weight: 650;
  color: var(--text-strong);
}
.vr-header-text p{
  margin: .2rem 0 0;
  font-size: .92rem;
  color: var(--text-muted);
}
body.vr-change-password .vr-header-text h1{
  font-size: 1.25rem;
  line-height: 1.15;
}
body.vr-login .vr-header-text h1{
  font-size: 1.35rem;
}
@media (max-width: 480px){
  body.vr-login .vr-header-text h1{ font-size: 1.25rem; }
  body.vr-change-password .vr-header-text h1{ font-size: 1.18rem; }
}

/* Icon pills */
.vr-mark, .vr-icon-mark{
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  background: var(--hdr-grad);
  border: 1px solid var(--active-row-border);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
  margin-top: 0.05rem;
  color: var(--brand-3);
}
.vr-mark svg, .vr-icon-mark svg{
  width: 1.25rem;
  height: 1.25rem;
  display:block;
  overflow:visible;
}

/* Login brand mark */
.vr-brand-mark{
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: var(--hdr-grad);
  border: 1px solid var(--active-row-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-3);
}

/* Login header row */
.vr-login-header{
  display:flex;
  align-items:center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

/* Meta pills */
.vr-meta{
  display:flex;
  justify-content: flex-start;
  align-items:center;
  margin-bottom: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  gap: 0.35rem;
}
.vr-meta-check{
  display:inline-flex;
  align-items:center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.vr-meta-check-icon{
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: #16a34a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #fff;
  flex: 0 0 auto;
}

/* Forms */
.vr-form{ margin-top: 0.25rem; }
.vr-field{ margin-bottom: 1rem; }
.vr-field-label-row{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.3rem;
  gap: .75rem;
}
.vr-label{
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-strong);
}
.vr-field-hint{
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.vr-input{
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background-color: var(--panel-soft);
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, transform 0.05s ease;
}
.vr-input::placeholder{ color: #cbd5f5; }
.vr-input:focus{
  border-color: var(--brand-1);
  background-color: #ffffff;
  box-shadow: 0 0 0 1px var(--brand-1), 0 0 0 5px rgba(230, 0, 0, 0.14);
  transform: translateY(0px);
}
.vr-input:invalid:focus{
  border-color: var(--brand-3);
  box-shadow: 0 0 0 1px var(--brand-3), 0 0 0 4px rgba(150, 0, 0, 0.16);
}

/* Buttons */
.vr-actions-row{ margin-top: 0.25rem; }
.vr-btn{
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-strong);
  border-radius: 999px;
  padding: .55rem .9rem;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  display:inline-flex;
  align-items:center;
  gap: .45rem;
  transition: background .15s ease, border-color .15s ease, transform .05s ease, box-shadow .15s ease;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  white-space: nowrap;
}
.vr-btn:hover{
  background: #fff0f0;
  border-color: var(--brand-2);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(108, 0, 0, 0.14);
}
.vr-btn:active{
  transform: translateY(1px);
  box-shadow: 0 8px 16px rgba(108, 0, 0, 0.10);
}
.vr-btn-primary{
  border: none;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-3));
  color: #fff;
  box-shadow: 0 12px 25px rgba(150, 0, 0, 0.28);
}
.vr-btn-primary:hover{
  background: linear-gradient(135deg, var(--brand-2), var(--brand-4));
  box-shadow: 0 16px 30px rgba(108, 0, 0, 0.36);
  border: none;
}
.vr-btn-primary:disabled,
.vr-btn-primary[aria-disabled="true"]{
  cursor: default;
  background: linear-gradient(135deg, var(--disabled), var(--disabled));
  box-shadow: none;
}
.vr-btn-full{ width:100%; justify-content:center; }
.vr-btn-chevron{ font-size: 1.1rem; line-height: 1; transform: translateY(1px); }
.vr-chev{ font-size: 1.05rem; line-height: 1; transform: translateY(1px); }

/* Alerts / notices */
.vr-error{
  display:flex;
  align-items:flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid var(--active-row-border);
  background: var(--active-row);
  color: var(--brand-3);
  font-size: 0.85rem;
}
.vr-error-icon{
  flex: 0 0 auto;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  background: var(--brand-1);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.05rem;
}
.vr-alert{
  display:flex;
  align-items:flex-start;
  gap: .55rem;
  margin: 0 0 1rem;
  padding: .75rem .85rem;
  border-radius: .85rem;
  border: 1px solid var(--border);
  background: #fff;
  font-size: .86rem;
}
.vr-alert.error{
  border-color: var(--active-row-border);
  background: var(--active-row);
  color: var(--brand-3);
}
.vr-alert.success{
  border-color: rgba(22,163,74,.25);
  background: rgba(22,163,74,.08);
  color: #166534;
}
.vr-alert-icon{
  flex: 0 0 auto;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight: 800;
  font-size: .85rem;
  margin-top: .05rem;
  color: #fff;
}
.vr-alert-icon.error{ background: var(--brand-1); }
.vr-alert-icon.success{ background: #16a34a; }

/* Footer (login) */
.vr-login-footer{
  margin-top: 1.1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.vr-login-footer span{
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.vr-status-dot{
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #16a34a;
}

/* Grids (account + change password identity cards) */
.vr-grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin-top: .5rem;
}
@media (max-width: 760px){
  .vr-grid-2{ grid-template-columns: 1fr; }
}
@media (max-width: 680px){
  body.vr-change-password .vr-grid-2{ grid-template-columns: 1fr; }
}

.vr-field-card{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.95rem;
  padding: .75rem .85rem .8rem;
  min-width: 0;
}
.vr-field-label{
  margin: 0 0 .35rem;
  font-size: .78rem;
  font-weight: 650;
  color: var(--text-strong);
}
.vr-field-value{
  margin: 0;
  font-size: .95rem;
  color: var(--text);
  word-break: break-word;
  line-height: 1.35;
}
.vr-field-value.muted{ color: var(--text-muted); }

/* Account meta row */
.vr-meta-row{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap: .5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: .82rem;
}
.vr-pill{
  display:inline-flex;
  align-items:center;
  gap: .4rem;
  padding: .22rem .65rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.vr-pill-dot{
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,0.12);
  flex: 0 0 auto;
}

/* Links */
.vr-subtle-link{
  color: var(--brand-3);
  text-decoration: none;
  font-weight: 600;
  font-size: .86rem;
}
.vr-subtle-link:hover{ text-decoration: underline; }

.vr-link{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  text-decoration:none;
  color: var(--tool-on);
  font-weight: 650;
  font-size:.9rem;
}
.vr-link:hover{ text-decoration: underline; }

/* Admin page specific */
.vr-admin-top-actions{
  margin-top: .9rem;
  display:flex;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  align-items:center;
}
.vr-notice{
  display:flex;
  align-items:flex-start;
  gap:.55rem;
  margin: 1rem 0 1rem;
  padding: .85rem .9rem;
  border-radius: .85rem;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  font-size: .9rem;
  line-height: 1.35;
}
.vr-notice strong{ color: var(--text-strong); }
.vr-notice.error{
  border-color: var(--active-row-border);
  background: var(--active-row);
  color: var(--brand-3);
}
.vr-notice.success{
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #14532d;
}
.vr-notice-icon{
  flex: 0 0 auto;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  font-size: .85rem;
  margin-top: .05rem;
}
.vr-notice.error .vr-notice-icon{ background: var(--brand-1); color:#fff; }
.vr-notice.success .vr-notice-icon{ background: #16a34a; color:#fff; }
.vr-notice.info .vr-notice-icon{ background: #e2e8f0; color:#0f172a; }

/* Tables (admin) */
.vr-table-wrap{
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow:hidden;
  background:#fff;
}
.vr-table{
  width:100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.vr-table thead th{
  text-align:left;
  padding: .75rem .85rem;
  background: var(--hdr-grad);
  color:#520000;
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .02em;
  border-bottom: 1px solid var(--border);
}
.vr-table tbody td{
  padding: .75rem .85rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.vr-table tbody tr:hover td{
  background: #f8fafc;
}
.vr-table tbody tr:last-child td{ border-bottom:0; }

.vr-sel-col{ width:46px; white-space:nowrap; }
.vr-checkbox{
  width: 16px;
  height: 16px;
  accent-color: var(--brand-2);
}
.vr-cell-muted{ color: var(--text-muted); font-size: .86rem; }

.vr-user-label{
  font-weight: 750;
  color: var(--text-strong);
}

/* Admin action bar */
.vr-admin-actions{
  margin-top: 1rem;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.vr-btn-secondary{
  border: 1px solid var(--border);
  background:#fff;
  border-radius: 999px;
  padding: .72rem 1rem;
  font-size: .92rem;
  font-weight: 650;
  cursor:pointer;
  color: var(--text-strong);
  display:inline-flex;
  align-items:center;
  gap:.45rem;
}
.vr-btn-secondary:hover{
  background:#fff0f0;
  border-color: var(--brand-2);
}

/* Password output card (admin) */
.vr-pw-card{
  margin-top: 1.15rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow:hidden;
  background:#fff;
}
.vr-pw-head{
  padding: .8rem .9rem;
  background: var(--hdr-grad);
  border-bottom: 1px solid var(--border);
  color:#520000;
  font-weight: 800;
  font-size: .85rem;
}
.vr-pw-body{ padding: .85rem .9rem; background: var(--panel-soft); }
.vr-pw-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:.6rem;
  margin:0;
  padding:0;
  list-style:none;
}
.vr-pw-item{
  background:#fff;
  border: 1px solid var(--border);
  border-radius: .9rem;
  padding: .75rem .85rem;
  display:flex;
  gap:.75rem;
  align-items:flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.vr-pw-user{
  min-width: 240px;
  font-weight: 750;
  color: var(--text-strong);
}
.vr-pw-pass{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: .6rem;
  padding: .25rem .5rem;
  color: #111827;
  white-space: nowrap;
}
.vr-pw-hint{
  margin-top: .55rem;
  font-size: .86rem;
  color: var(--text-muted);
  line-height: 1.35;
}
@media (max-width: 680px){
  .vr-table thead th, .vr-table tbody td{ padding: .7rem .7rem; }
}
