/* =============================================================
   GLOBAL MODAL SAFETY FIX
   This prevents hidden popups from showing and makes all modal
   pages behave consistently after future patches.
   ============================================================= */
[hidden],
.modal-backdrop[hidden],
.modal-card[hidden] {
  display: none !important;
}
.modal-backdrop:not([hidden]),
.modal-backdrop.is-open {
  display: grid !important;
}
body.modal-open {
  overflow: hidden;
}
.modal-error-box {
  padding: 16px;
  border-radius: 16px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  line-height: 1.55;
}

:root{--bg:#f6f7fb;--panel:#fff;--ink:#152033;--muted:#667085;--line:#e6e9f0;--brand:#1c7c54;--brand-dark:#12543a;--danger:#b42318;--soft:#edf7f2;--shadow:0 18px 45px rgba(16,24,40,.08)}*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--ink)}a{color:inherit;text-decoration:none}.topbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;padding:14px 28px;background:rgba(255,255,255,.92);backdrop-filter:blur(16px);border-bottom:1px solid var(--line)}.logo{font-weight:900;letter-spacing:.12em;color:var(--brand)}nav{display:flex;gap:16px;flex-wrap:wrap}nav a{font-weight:700;color:var(--muted)}nav a:hover{color:var(--brand)}.container{max-width:1180px;margin:0 auto;padding:28px}.welcome{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-bottom:20px}.eyebrow{font-weight:900;color:var(--brand);letter-spacing:.14em;text-transform:uppercase;font-size:.8rem}.muted{color:var(--muted)}.panel,.card,.stat,.hero-card,.qr-card{background:var(--panel);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}.panel{padding:24px;margin-bottom:20px}.card{padding:18px;display:flex;justify-content:space-between;gap:20px;align-items:center}.cards{display:grid;gap:14px}.stat{padding:20px}.stat span{display:block;color:var(--muted);font-weight:700}.stat strong{display:block;font-size:2rem;margin-top:5px}.grid{display:grid;gap:18px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.section-head{display:flex;justify-content:space-between;gap:18px;align-items:center}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:14px;background:var(--brand);color:white;padding:12px 16px;font-weight:900;cursor:pointer;box-shadow:0 8px 20px rgba(28,124,84,.18)}.btn:hover{background:var(--brand-dark)}.btn-secondary{background:#26364f}.btn-danger{background:var(--danger)}.btn-small{padding:8px 11px;border-radius:10px;font-size:.86rem}input,select,textarea{width:100%;border:1px solid var(--line);background:white;border-radius:14px;padding:12px 13px;font:inherit;margin:7px 0}textarea{min-height:95px}.codebox{font-family:ui-monospace,Menlo,Consolas,monospace;min-height:150px}.check{display:flex;align-items:center;gap:10px;margin:8px 0}.check input{width:auto}.notice{min-height:22px;font-weight:800}.notice.ok,.ok{color:var(--brand)}.notice.bad,.bad{color:var(--danger)}.pill{display:inline-flex;padding:5px 9px;border-radius:999px;background:#eef2f6;font-size:.78rem;font-weight:900;color:#344054}.pill.ok{background:#dcfae6;color:#067647}.pill.bad{background:#fee4e2;color:#b42318}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:13px 10px;border-bottom:1px solid var(--line);vertical-align:top}th{font-size:.83rem;text-transform:uppercase;color:var(--muted);letter-spacing:.06em}.badges{display:flex;gap:12px;flex-wrap:wrap}.badge{display:grid;gap:4px;padding:15px;border:1px solid var(--line);border-radius:18px;background:var(--soft);min-width:170px}.badge span{font-size:1.8rem}.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:18px}.photo-card{overflow:hidden;background:white;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}.photo-card img{width:100%;height:190px;object-fit:cover;display:block;background:#eef2f6}.photo-body{padding:15px}.map-placeholder,.waiver-box{border:1px dashed #aab4c2;background:#fbfcff;border-radius:18px;padding:18px;margin:14px 0}.inline-controls{display:flex;gap:10px;align-items:center}.inline-controls select{max-width:420px}.auth-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#f3fbf7,#f6f7fb)}.auth-shell{width:min(1120px,94vw);display:grid;grid-template-columns:1fr 1fr;gap:22px;align-items:start}.hero-card{padding:42px;min-height:520px;background:linear-gradient(135deg,#0c3b29,#1c7c54);color:white}.hero-card p{color:rgba(255,255,255,.82);font-size:1.15rem;line-height:1.6}.brand-badge{width:80px;height:80px;border-radius:24px;display:grid;place-items:center;background:white;color:var(--brand);font-weight:900;letter-spacing:.12em}.compact-form{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}.compact-form textarea,.compact-form .check,.compact-form button{grid-column:1/-1}.qr-card{padding:22px;text-align:center;color:var(--muted)}.qr-card strong{font-size:2rem;color:var(--ink)}hr{border:0;border-top:1px solid var(--line);margin:22px 0}@media(max-width:850px){.grid.two,.grid.three,.auth-shell{grid-template-columns:1fr}.welcome,.card,.section-head,.topbar{align-items:flex-start;flex-direction:column}.container{padding:18px}.compact-form{grid-template-columns:1fr}}

/* Webcam selfie upload */
.upload-options { display: grid; gap: 12px; }
.field-label { display: block; font-weight: 700; margin-bottom: 6px; }
.camera-panel { border: 1px solid #e5e7eb; border-radius: 16px; padding: 14px; background: #fbfdff; }
.section-head.compact { margin-bottom: 6px; }
.section-head.compact h3 { margin: 0; font-size: 1rem; }
.small { font-size: .9rem; }
.camera-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.camera-video, .selfie-preview { width: 100%; max-height: 360px; object-fit: cover; border-radius: 16px; background: #111827; border: 1px solid #e5e7eb; }
.btn-light { background: #f3f4f6; color: #111827; }
.notice.bad { color: #b91c1c; }

/* Pro upgrade: route maps, QR scanner, production UI helpers */
.route-builder-grid{display:grid;grid-template-columns:minmax(320px,420px) 1fr;gap:1rem;align-items:start}.route-form textarea{min-height:90px}.compact-grid{gap:.6rem}.map-canvas{width:100%;height:520px;border-radius:22px;border:1px solid rgba(15,23,42,.12);background:#eef2f7;overflow:hidden}.small-map{height:360px}.map-toolbar{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.75rem}.map-toolbar .active{outline:3px solid rgba(36,99,235,.2)}.route-points-list{display:grid;gap:.65rem;margin-top:.75rem}.route-point-row{display:grid;grid-template-columns:auto 1fr 145px auto auto;gap:.5rem;align-items:center;padding:.6rem;border:1px solid rgba(15,23,42,.08);border-radius:14px;background:#fff}.route-point-row input,.route-point-row select{min-height:38px}.field-label{display:block;font-size:.85rem;font-weight:700;margin:.65rem 0 .35rem}.small{font-size:.86rem}.qr-reader{width:100%;max-width:420px;min-height:260px;border-radius:18px;border:1px dashed rgba(15,23,42,.2);padding:.5rem;background:#fff;margin:.75rem 0}.manual-qr-form{margin-top:1rem}.qr-page{text-align:center}.member-qr{display:inline-flex;align-items:center;justify-content:center;padding:1rem;border-radius:22px;background:#fff;box-shadow:0 10px 30px rgba(15,23,42,.12);margin:1rem auto}.qr-token{display:block;white-space:normal;word-break:break-all;margin:.75rem auto;max-width:360px}.narrow{max-width:760px}.btn-light{background:#f8fafc;color:#0f172a;border:1px solid rgba(15,23,42,.12)}.qr-card{text-decoration:none;color:inherit}.notice code{background:rgba(15,23,42,.08);padding:.1rem .35rem;border-radius:.4rem}.production-list{display:grid;gap:.55rem}.production-list li{padding:.5rem .75rem;background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:12px}
@media(max-width:980px){.route-builder-grid{grid-template-columns:1fr}.route-point-row{grid-template-columns:1fr}.map-canvas{height:420px}}

/* Pyrk polished dropdown navigation */
.topbar.pro-nav{
  position:sticky;
  top:0;
  z-index:1000;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  padding:12px 28px;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(18px);
  border-bottom:1px solid rgba(230,233,240,.9);
  box-shadow:0 14px 34px rgba(16,24,40,.06);
}
.brand{
  display:inline-flex;
  align-items:center;
  gap:11px;
  min-width:max-content;
}
.brand-mark{
  width:44px;
  height:44px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--brand),#24a36f);
  color:#fff;
  font-weight:950;
  letter-spacing:.08em;
  box-shadow:0 10px 20px rgba(28,124,84,.2);
}
.brand-copy{display:grid;line-height:1.05}.brand-copy strong{font-size:1rem;letter-spacing:.01em}.brand-copy small{margin-top:3px;color:var(--muted);font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.11em}
.nav-menu{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-width:0;
}
.nav-link,.nav-group-btn{
  border:0;
  appearance:none;
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:42px;
  padding:10px 13px;
  border-radius:13px;
  background:transparent;
  color:#475467;
  font:inherit;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
  transition:background .18s ease,color .18s ease,box-shadow .18s ease;
}
.nav-link:hover,.nav-link.active,.nav-group-btn:hover,.nav-group-btn.active,.nav-group.open>.nav-group-btn{
  color:var(--brand);
  background:var(--soft);
  box-shadow:inset 0 0 0 1px rgba(28,124,84,.08);
}
.nav-group{position:relative}.nav-group-btn span{font-size:.78rem;transition:transform .18s ease}.nav-group.open>.nav-group-btn span{transform:rotate(180deg)}
.nav-dropdown{
  position:absolute;
  left:50%;
  top:calc(100% + 12px);
  transform:translateX(-50%) translateY(8px);
  min-width:290px;
  display:grid;
  gap:6px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
  box-shadow:0 24px 60px rgba(16,24,40,.16);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease,transform .18s ease,visibility .18s ease;
}
.nav-dropdown-wide{min-width:360px}.nav-group.open>.nav-dropdown,.nav-group:focus-within>.nav-dropdown{opacity:1;visibility:visible;pointer-events:auto;transform:translateX(-50%) translateY(0)}
.nav-dropdown:before{
  content:"";
  position:absolute;
  top:-7px;
  left:50%;
  width:14px;
  height:14px;
  transform:translateX(-50%) rotate(45deg);
  background:#fff;
  border-left:1px solid var(--line);
  border-top:1px solid var(--line);
}
.nav-dropdown a{
  position:relative;
  display:grid;
  gap:3px;
  padding:12px 13px;
  border-radius:14px;
  color:var(--ink);
  font-weight:800;
}
.nav-dropdown a:hover,.nav-dropdown a.active{background:#f3f7f5;color:var(--brand)}
.nav-dropdown a small{color:var(--muted);font-weight:650;line-height:1.35}.nav-dropdown a:hover small,.nav-dropdown a.active small{color:#3b6f59}
.nav-user{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  min-width:max-content;
}
.user-chip{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:5px 10px 5px 5px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  box-shadow:0 6px 18px rgba(16,24,40,.05);
}
.user-chip>span{
  width:34px;
  height:34px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#26364f;
  color:#fff;
  font-weight:900;
}
.user-chip div{display:grid;line-height:1.05}.user-chip strong{max-width:135px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.88rem}.user-chip small{margin-top:3px;color:var(--muted);font-size:.72rem;text-transform:capitalize;font-weight:800}.btn-logout{background:#26364f;box-shadow:none}.btn-logout:hover{background:#172033}
.nav-toggle{
  display:none;
  width:44px;
  height:44px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  cursor:pointer;
  align-items:center;
  justify-content:center;
  gap:4px;
  flex-direction:column;
}
.nav-toggle span{width:19px;height:2px;border-radius:999px;background:#172033;display:block;transition:transform .18s ease,opacity .18s ease}.pro-nav.nav-open .nav-toggle span:nth-child(1){transform:translateY(6px) rotate(45deg)}.pro-nav.nav-open .nav-toggle span:nth-child(2){opacity:0}.pro-nav.nav-open .nav-toggle span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
@media(max-width:1100px){
  .topbar.pro-nav{grid-template-columns:auto auto;justify-content:space-between;padding:12px 18px;gap:12px}.nav-toggle{display:flex}.nav-menu{
    grid-column:1/-1;
    display:none;
    width:100%;
    justify-content:stretch;
    flex-direction:column;
    align-items:stretch;
    padding:12px;
    border:1px solid var(--line);
    border-radius:22px;
    background:#fff;
    box-shadow:0 16px 36px rgba(16,24,40,.08);
  }
  .pro-nav.nav-open .nav-menu{display:flex}.nav-link,.nav-group-btn{width:100%;justify-content:space-between}.nav-group{width:100%}.nav-dropdown,.nav-dropdown-wide{
    position:static;
    transform:none;
    min-width:0;
    width:100%;
    box-shadow:none;
    border-radius:16px;
    margin:4px 0 8px;
    display:none;
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
  .nav-dropdown:before{display:none}.nav-group.open>.nav-dropdown,.nav-group:focus-within>.nav-dropdown{display:grid;transform:none}.nav-user{grid-column:1/-1;width:100%;justify-content:space-between}.user-chip{min-width:0}.user-chip strong{max-width:55vw}
}
@media(max-width:520px){
  .topbar.pro-nav{padding:10px 12px}.brand-copy small{display:none}.brand-mark{width:40px;height:40px;border-radius:13px}.btn-logout{padding:9px 11px}.user-chip{max-width:calc(100vw - 130px)}.user-chip div{min-width:0}.user-chip strong{max-width:42vw}
}

/* Management upgrade: user creation, route cards, upgraded dashboards */
.page-hero{display:flex;justify-content:space-between;align-items:center;gap:22px;padding:30px;border-radius:30px;background:linear-gradient(135deg,#ffffff,#f3fbf7);border:1px solid var(--line);box-shadow:0 18px 50px rgba(16,24,40,.07);margin:22px 0}.page-hero h1{font-size:clamp(2rem,4vw,3.4rem);margin:.15rem 0}.admin-hero{background:radial-gradient(circle at 90% 20%,rgba(28,124,84,.13),transparent 30%),linear-gradient(135deg,#fff,#f7fbff)}.client-hero{background:radial-gradient(circle at 85% 15%,rgba(36,163,111,.18),transparent 30%),linear-gradient(135deg,#fff,#f4fbf7)}.hero-actions{display:flex;gap:10px;flex-wrap:wrap}.grid.four{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.compact-stats{margin:18px 0}.stat-pro{position:relative;overflow:hidden}.stat-pro:after{content:"";position:absolute;right:-24px;bottom:-28px;width:92px;height:92px;border-radius:50%;background:rgba(28,124,84,.08)}.skeleton{min-height:92px;background:linear-gradient(90deg,#f3f4f6,#fff,#f3f4f6);background-size:200% 100%;animation:pyrk-pulse 1.4s linear infinite}@keyframes pyrk-pulse{to{background-position:-200% 0}}
.admin-dashboard-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:18px}.client-dashboard-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.55fr);gap:18px}.dashboard-card-large{min-height:420px}.quick-actions-grid{display:grid;gap:12px}.quick-actions-grid a{display:grid;gap:4px;padding:16px;border:1px solid var(--line);border-radius:18px;background:#fff;color:var(--ink)}.quick-actions-grid a:hover{background:var(--soft);border-color:rgba(28,124,84,.25)}.quick-actions-grid span{color:var(--muted);font-size:.9rem}.timeline-list,.walk-card-list,.mini-list,.member-row-list{display:grid;gap:12px}.timeline-item,.walk-card,.member-row-list article{display:flex;align-items:center;gap:14px;padding:14px;border:1px solid var(--line);border-radius:20px;background:#fff}.timeline-item h3,.walk-card h3{margin:0 0 4px}.timeline-item p,.walk-card p{margin:0}.date-chip{width:58px;height:64px;border-radius:18px;background:var(--soft);color:var(--brand);display:grid;place-items:center;line-height:1}.date-chip strong{font-size:1.45rem}.date-chip span{font-size:.76rem;font-weight:900}.walk-card-body{flex:1}.walk-card-actions{display:flex;flex-direction:column;align-items:flex-end;gap:8px}.mini-list article{padding:13px;border:1px solid var(--line);border-radius:16px;background:#fff;display:grid;gap:3px}.mini-list span,.member-row-list span{color:var(--muted);font-size:.9rem}.member-row-list article small{margin-left:auto;font-weight:900;color:var(--brand)}.profile-progress-panel{position:relative}.progress-ring-card{text-align:center;padding:16px}.progress-ring{width:154px;height:154px;margin:0 auto 14px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--brand) 0 70%,#eaf1ed 70% 100%);box-shadow:inset 0 0 0 16px #fff,0 18px 45px rgba(16,24,40,.08)}.progress-ring strong{font-size:2rem;color:var(--brand)}.progress-ring span{font-size:.78rem;font-weight:900;color:var(--muted);margin-top:-42px}.next-walk-box{padding:15px;border-radius:18px;background:#f8fafc;border:1px solid var(--line)}.next-walk-box h3{margin:0 0 6px}.hero-qr{display:grid!important;gap:4px;text-decoration:none;min-width:190px}.hero-qr span{font-size:2rem}.badge-pro{box-shadow:0 10px 30px rgba(16,24,40,.06)}
.admin-main-grid{display:grid;grid-template-columns:430px minmax(0,1fr);gap:18px;align-items:start}.sticky-panel{position:sticky;top:92px}.wide-panel{grid-column:1/-1}.stack-form{display:grid;gap:12px}.form-grid{display:grid;gap:12px}.form-grid.two{grid-template-columns:1fr 1fr}.stack-form label{display:grid;gap:6px;font-weight:800;color:var(--ink)}.stack-form label input,.stack-form label select,.stack-form label textarea{font-weight:500}.member-only-box{padding:14px;border:1px solid var(--line);border-radius:20px;background:#fbfdff}.search-controls input,.search-controls select{min-height:42px}.member-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:14px}.member-card{display:grid;gap:12px;padding:16px;border:1px solid var(--line);border-radius:22px;background:#fff;box-shadow:0 10px 30px rgba(16,24,40,.04)}.member-card-head{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center}.member-card h3{margin:0}.member-card p{margin:0}.avatar{width:42px;height:42px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(135deg,#26364f,#1c7c54);color:#fff;font-weight:950}.member-meta{display:flex;flex-wrap:wrap;gap:8px}.member-meta span{padding:6px 9px;border-radius:999px;background:#f3f7f5;color:#3b6f59;font-size:.82rem;font-weight:800}.mini-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.mini-metrics div{padding:10px;border-radius:15px;background:#f8fafc;border:1px solid var(--line);display:grid}.mini-metrics strong{font-size:1.2rem}.mini-metrics span{font-size:.75rem;color:var(--muted);font-weight:800}.member-note{padding:10px;border-radius:14px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412}.pill-green{background:#ecfdf3;color:#067647}.pill-muted{background:#f2f4f7;color:#667085}
.route-library-panel{margin-bottom:18px}.route-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:16px}.route-card{display:grid;gap:14px;padding:18px;border:1px solid var(--line);border-radius:24px;background:#fff;box-shadow:0 14px 34px rgba(16,24,40,.05)}.route-card-top{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:start}.route-card h3{margin:0 0 4px}.route-card p{margin:0}.route-icon{width:50px;height:50px;border-radius:18px;background:var(--soft);display:grid;place-items:center;font-size:1.35rem}.route-path-visual{height:54px;border-radius:18px;background:linear-gradient(135deg,#f4fbf7,#f8fafc);display:flex;align-items:center;justify-content:center;padding:0 18px}.route-path-visual span{width:14px;height:14px;border-radius:50%;background:var(--brand);box-shadow:0 0 0 6px rgba(28,124,84,.1)}.route-path-visual i{height:3px;flex:1;max-width:94px;background:repeating-linear-gradient(90deg,var(--brand),var(--brand) 8px,transparent 8px,transparent 15px);opacity:.6}.route-card-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.route-card-meta div{display:grid;place-items:center;padding:10px 8px;border-radius:14px;background:#f8fafc;border:1px solid var(--line)}.route-card-meta strong{font-size:1.15rem}.route-card-meta span{font-size:.74rem;text-transform:uppercase;font-weight:900;color:var(--muted)}.route-from-to{line-height:1.6}.route-card-points{display:grid;gap:7px;padding:12px;border-radius:16px;background:#f8fafc;border:1px solid var(--line)}.route-card-points div{display:grid;gap:2px}.route-card-points span{color:var(--muted);font-size:.86rem}.route-form .codebox{max-height:190px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.82rem}.btn-secondary{background:#2463eb}.btn-secondary:hover{background:#1d4ed8}
@media(max-width:1100px){.grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-dashboard-grid,.client-dashboard-grid,.admin-main-grid{grid-template-columns:1fr}.sticky-panel{position:static}.page-hero{align-items:flex-start;flex-direction:column}.walk-card-actions{align-items:flex-start}.timeline-item,.walk-card{align-items:flex-start}}
@media(max-width:650px){.grid.four,.form-grid.two{grid-template-columns:1fr}.route-card-grid,.member-grid{grid-template-columns:1fr}.route-card-meta{grid-template-columns:repeat(2,1fr)}.timeline-item,.walk-card,.member-row-list article{flex-direction:column}.member-row-list article small{margin-left:0}.page-hero{padding:22px}.admin-main-grid{gap:12px}}

/* Enterprise CRM upgrade: separated users and members, pro tables, avatars */
.enterprise-page{padding-bottom:54px}.enterprise-hero{border:1px solid rgba(28,124,84,.14);box-shadow:0 22px 70px rgba(16,24,40,.08)}.enterprise-grid{grid-template-columns:440px minmax(0,1fr)}.enterprise-form-panel{border-top:4px solid var(--brand);box-shadow:0 18px 50px rgba(16,24,40,.07)}.enterprise-table-panel{overflow:hidden}.profile-upload-box{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center;padding:14px;border-radius:20px;background:linear-gradient(135deg,#f8fafc,#fff);border:1px solid var(--line)}.profile-upload-box small{grid-column:2}.upload-trigger{display:grid!important;gap:8px;padding:13px 14px;border:1px dashed rgba(28,124,84,.38);border-radius:16px;background:#fff;color:var(--brand);cursor:pointer}.upload-trigger input{font-weight:500!important}.avatar-preview,.avatar-img{width:44px;height:44px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,#26364f,#1c7c54);color:#fff;font-weight:950;object-fit:cover;box-shadow:0 10px 24px rgba(16,24,40,.12)}.avatar-preview.xl,.avatar-img.xl,.avatar.xl{width:78px;height:78px;border-radius:26px;font-size:1.35rem}.avatar-img{background:#fff}.identity-cell{display:flex;align-items:center;gap:12px;min-width:245px}.identity-cell strong{display:block;color:var(--ink);line-height:1.2}.identity-cell small,td small{display:block;color:var(--muted);font-size:.82rem;margin-top:3px}.role-badge{display:inline-flex;align-items:center;min-height:28px;padding:6px 10px;border-radius:999px;background:#eef6ff;color:#175cd3;font-weight:900;font-size:.8rem}.pro-table-wrap{border:1px solid var(--line);border-radius:22px;overflow:auto;background:#fff}.pro-table{min-width:900px;border-collapse:separate;border-spacing:0;width:100%}.pro-table thead th{position:sticky;top:0;z-index:1;background:#f8fafc;color:#475467;text-transform:uppercase;font-size:.73rem;letter-spacing:.07em;border-bottom:1px solid var(--line)}.pro-table th,.pro-table td{padding:14px 16px;text-align:left;border-bottom:1px solid #eef2f6;vertical-align:middle}.pro-table tbody tr{transition:background .14s ease,box-shadow .14s ease}.pro-table tbody tr:hover{background:#fbfefc}.pro-table tbody tr:last-child td{border-bottom:0}.table-actions{text-align:right;white-space:nowrap}.enterprise-card-grid{margin-top:12px}.enterprise-member-card{position:relative;overflow:hidden}.enterprise-member-card:before{content:"";position:absolute;right:-35px;top:-35px;width:110px;height:110px;border-radius:50%;background:rgba(28,124,84,.06)}.search-controls{flex-wrap:wrap}.search-controls input{min-width:240px}.search-controls select{min-width:150px}.btn.btn-light{border:1px solid var(--line)}.notice:empty{display:none}.pill{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:5px 10px;border-radius:999px;font-weight:900;font-size:.78rem;text-transform:capitalize}.panel.enterprise-table-panel .section-head{align-items:flex-start}.panel.enterprise-table-panel .section-head h2{margin-bottom:0}.panel.enterprise-table-panel .section-head .inline-controls{justify-content:flex-end}.avatar{flex:0 0 auto}.dashboard-hero .hero-actions{align-items:center}.quick-actions-grid a strong{font-size:1rem}.quick-actions-grid a{transition:transform .15s ease,box-shadow .15s ease}.quick-actions-grid a:hover{transform:translateY(-2px);box-shadow:0 14px 32px rgba(16,24,40,.08)}
@media(max-width:1100px){.enterprise-grid{grid-template-columns:1fr}.profile-upload-box{grid-template-columns:auto 1fr}.pro-table{min-width:760px}.panel.enterprise-table-panel .section-head{display:grid;gap:12px}.panel.enterprise-table-panel .section-head .inline-controls{justify-content:flex-start}}
@media(max-width:620px){.profile-upload-box{grid-template-columns:1fr;text-align:left}.profile-upload-box small{grid-column:auto}.avatar-preview.xl,.avatar-img.xl,.avatar.xl{width:68px;height:68px}.identity-cell{min-width:210px}.search-controls input,.search-controls select{width:100%;min-width:0}.enterprise-hero .hero-actions{width:100%}.enterprise-hero .hero-actions .btn{width:100%;justify-content:center}}
.user-chip img{width:38px;height:38px;border-radius:13px;object-fit:cover;box-shadow:0 8px 18px rgba(16,24,40,.12)}
.client-hero-card{min-width:280px;padding:14px 16px;border-radius:24px;background:#fff;border:1px solid var(--line);box-shadow:0 16px 42px rgba(16,24,40,.08);display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center}.client-hero-card strong{display:block;color:var(--ink)}.client-hero-card small{display:block;color:var(--muted);font-weight:800;margin-top:3px}@media(max-width:650px){.client-hero-card{width:100%;grid-template-columns:auto 1fr}.client-hero-card .btn{grid-column:1/-1;justify-content:center}}

/* Patch: wider member CRM, modal create/edit, rich member profile, walk registrants */
.member-crm-container,.admin-walks-container{max-width:1540px}.crm-wide-panel{padding:24px 24px 30px}.crm-section-head{align-items:flex-start}.crm-table-wrap{max-height:72vh;border-radius:24px}.members-pro-table{min-width:1280px}.registrants-table{min-width:1120px}.wide-identity{min-width:285px}.clickable-row{cursor:pointer}.clickable-row:hover td{background:#f8fffb}.clickable-card{cursor:pointer}.medical-preview{display:-webkit-box;max-width:260px;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#9a3412;background:#fff7ed;border:1px solid #fed7aa;padding:8px 10px;border-radius:12px}.pill-red{background:#fee4e2;color:#b42318}.small{font-size:.86rem}.tiny-controls{gap:6px;flex-wrap:wrap}.four-metrics{grid-template-columns:repeat(4,1fr)}
body.modal-open{overflow:hidden}.modal-backdrop{position:fixed;inset:0;z-index:60;background:rgba(15,23,42,.58);backdrop-filter:blur(8px);display:grid;place-items:center;padding:24px}.modal-card{width:min(760px,96vw);max-height:92vh;overflow:auto;background:#fff;border:1px solid rgba(255,255,255,.4);border-radius:28px;box-shadow:0 30px 90px rgba(2,8,23,.28);padding:24px}.modal-large{width:min(980px,96vw)}.member-profile-modal{width:min(1220px,96vw)}.walk-registrants-modal{width:min(1180px,96vw)}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.modal-head h2{margin:2px 0 0}.icon-btn{width:42px;height:42px;border-radius:14px;border:1px solid var(--line);background:#fff;color:var(--ink);font-size:1.55rem;font-weight:900;line-height:1;cursor:pointer}.icon-btn:hover{background:#f8fafc}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}.modal-card .profile-upload-box{margin-bottom:8px}
.member-profile-content{display:grid;gap:18px}.member-profile-hero{display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center;padding:16px;border-radius:24px;background:linear-gradient(135deg,#f1fbf6,#fff);border:1px solid rgba(28,124,84,.15)}.member-profile-hero h3{font-size:1.55rem;margin:0 0 4px}.profile-pills{margin-top:10px}.profile-quick-actions{align-self:start}.profile-stat-grid .stat{box-shadow:none;border-radius:18px}.profile-info-grid{display:grid;grid-template-columns:1fr 1.4fr 1fr;gap:14px}.profile-info-card,.profile-panel{padding:16px;border:1px solid var(--line);border-radius:22px;background:#fff;box-shadow:0 10px 28px rgba(16,24,40,.04)}.profile-info-card h4,.profile-panel h3{margin:0 0 8px}.profile-info-card p{margin:0;line-height:1.6}.profile-tabs-grid{display:grid;gap:16px}.compact-table-wrap{max-height:330px;border-radius:18px}.compact-pro-table{min-width:760px}.compact-pro-table th,.compact-pro-table td{padding:11px 12px}.profile-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}.profile-photo-card{display:grid;grid-template-columns:74px 1fr;gap:12px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:18px;background:#fbfdff}.profile-photo-card img{width:74px;height:74px;border-radius:16px;object-fit:cover}.profile-photo-card strong,.profile-photo-card small{display:block}.profile-photo-card small{color:var(--muted);margin-top:3px}.profile-badge-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}.profile-badge{display:grid;gap:3px;justify-items:center;text-align:center;padding:13px;border:1px solid var(--line);border-radius:18px;background:#f8fafc}.profile-badge span{font-size:1.7rem}.profile-badge strong{font-size:.92rem}.profile-badge small{color:var(--muted);font-weight:800}
.walks-admin-grid{grid-template-columns:430px minmax(0,1fr);align-items:start}.schedule-panel{position:sticky;top:92px}.walk-admin-list{display:grid;gap:14px}.walk-admin-card{display:grid;grid-template-columns:minmax(0,1fr) 330px auto;gap:14px;align-items:center;padding:16px;border:1px solid var(--line);border-radius:24px;background:#fff;box-shadow:0 12px 34px rgba(16,24,40,.05)}.walk-admin-card-main{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center}.walk-admin-card h3{margin:7px 0 5px}.walk-admin-card p{margin:0}.walk-admin-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.walk-admin-metrics div{display:grid;place-items:center;padding:10px;border:1px solid var(--line);border-radius:16px;background:#f8fafc}.walk-admin-metrics strong{font-size:1.25rem}.walk-admin-metrics span{font-size:.74rem;text-transform:uppercase;color:var(--muted);font-weight:900}.walk-admin-actions{display:flex;flex-direction:column;gap:8px}.registrant-stats{margin-bottom:14px}
@media(max-width:1200px){.walks-admin-grid{grid-template-columns:1fr}.schedule-panel{position:static}.walk-admin-card{grid-template-columns:1fr}.walk-admin-actions{flex-direction:row}.profile-info-grid{grid-template-columns:1fr}.member-profile-hero{grid-template-columns:auto 1fr}.profile-quick-actions{grid-column:1/-1}.members-pro-table{min-width:1120px}}
@media(max-width:680px){.modal-backdrop{padding:12px;place-items:start center}.modal-card{border-radius:22px;padding:18px}.member-profile-hero{grid-template-columns:1fr;text-align:left}.profile-photo-grid{grid-template-columns:1fr}.walk-admin-metrics{grid-template-columns:1fr 1fr}.walk-admin-actions{flex-direction:column}.modal-actions{flex-direction:column}.modal-actions .btn{width:100%}.four-metrics{grid-template-columns:repeat(2,1fr)}}

/* Patch: member profile load fix, wider CRM, clickable dashboard stats, loyalty management */
.container.enterprise-page,.container.member-crm-container,.container.loyalty-admin-container{max-width:1600px;width:min(1600px,98vw)}
.crm-table-wrap,.loyalty-table-wrap{width:100%;overflow:auto}.members-pro-table{min-width:1420px}.loyalty-pro-table{min-width:1120px}.member-profile-modal{width:min(1360px,98vw)}
.clickable-stat{display:block;color:inherit;text-decoration:none;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}.clickable-stat:hover{transform:translateY(-3px);box-shadow:0 20px 52px rgba(16,24,40,.12);border-color:rgba(28,124,84,.28)}.clickable-stat em{display:inline-flex;margin-top:8px;color:var(--brand);font-style:normal;font-weight:900;font-size:.82rem}.clickable-panel{color:inherit;text-decoration:none}.mini-list-link{padding:13px;border:1px solid var(--line);border-radius:16px;background:#fff;display:grid;gap:3px;transition:background .15s ease,transform .15s ease}.mini-list-link:hover{background:#f8fffb;transform:translateY(-1px)}.member-row-list a{display:flex;align-items:center;gap:14px;padding:14px;border:1px solid var(--line);border-radius:20px;background:#fff;color:inherit;text-decoration:none}.member-row-list a:hover{background:#f8fffb}.member-row-list a small{margin-left:auto;font-weight:900;color:var(--brand)}.avatar.mini-avatar{width:38px;height:38px;border-radius:13px;font-size:.86rem}.notice.bad{display:block;padding:14px;border-radius:16px;background:#fff4f3;border:1px solid #fecaca;color:#b42318}.notice.ok{display:block;padding:14px;border-radius:16px;background:#ecfdf3;border:1px solid #bbf7d0;color:#067647}
.loyalty-grid{grid-template-columns:minmax(420px,.85fr) minmax(0,1.15fr);align-items:start}.loyalty-action-form{padding:16px;border:1px solid var(--line);border-radius:20px;background:#fbfdff;margin-top:14px}.loyalty-member-focus{margin:6px 0 16px}.loyalty-focus-card{display:grid;grid-template-columns:auto 1fr auto auto auto;gap:14px;align-items:center;padding:16px;border:1px solid rgba(28,124,84,.18);border-radius:22px;background:linear-gradient(135deg,#f1fbf6,#fff)}.loyalty-focus-card strong{display:block}.loyalty-focus-card span{display:block;color:var(--muted);font-size:.9rem}.loyalty-focus-metrics{min-width:86px;text-align:center;padding:10px 12px;border:1px solid var(--line);border-radius:16px;background:#fff}.loyalty-focus-metrics b{display:block;font-size:1.3rem;color:var(--brand)}.loyalty-focus-metrics small{font-size:.72rem;text-transform:uppercase;font-weight:900;color:var(--muted)}.badge-management-grid{display:grid;gap:12px}.badge-rule-card{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;padding:15px;border:1px solid var(--line);border-radius:22px;background:#fff;box-shadow:0 10px 28px rgba(16,24,40,.04)}.badge-rule-icon{width:58px;height:58px;border-radius:20px;display:grid;place-items:center;background:var(--soft);font-size:1.8rem}.badge-rule-body strong{display:block;font-size:1.05rem}.badge-rule-body p{margin:4px 0 10px;color:var(--muted);line-height:1.45}.pill-green{background:#dcfae6;color:#067647}.pill-muted{background:#eef2f6;color:#344054}.profile-tabs-grid .profile-panel:last-child{grid-column:1/-1}.profile-quick-actions{display:flex;gap:8px;flex-wrap:wrap}.section-head .btn.btn-light{white-space:nowrap}
@media(max-width:1150px){.loyalty-grid{grid-template-columns:1fr}.loyalty-focus-card{grid-template-columns:auto 1fr}.loyalty-focus-metrics,.loyalty-focus-card .btn{grid-column:auto}.members-pro-table{min-width:1180px}}
@media(max-width:720px){.loyalty-focus-card{grid-template-columns:1fr}.badge-rule-card{grid-template-columns:1fr}.container.enterprise-page,.container.member-crm-container,.container.loyalty-admin-container{width:100%;padding-left:14px;padding-right:14px}}

/* Security center upgrade */
.btn-danger {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}
.btn-danger:hover { filter: brightness(0.95); }
.security-page .security-grid {
  align-items: start;
}
.security-settings-panel {
  border-top: 4px solid #0f766e;
}
.security-hero {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(15, 23, 42, 0.08));
}
.security-table-wrap,
.security-logs-panel .table-wrap {
  overflow-x: auto;
}
.security-table,
.security-log-table {
  min-width: 1100px;
}
.security-log-table th:nth-child(5),
.security-log-table td:nth-child(5) {
  min-width: 320px;
}
.security-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  max-width: 260px;
}
.security-mini strong,
.security-mini small {
  display: inline-flex;
  align-items: center;
}
.device-text {
  display: block;
  max-width: 420px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #64748b;
  font-size: 0.84rem;
}
.pill-red {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}
.security-stats .stat small {
  color: #64748b;
  font-weight: 700;
}
.table-actions {
  gap: 6px;
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .security-grid { grid-template-columns: 1fr; }
  .security-table, .security-log-table { min-width: 900px; }
}

/* Patch: cleaner nav actions, change password page, enterprise photo command center */
.nav-user{gap:8px}.nav-action-pill{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 12px;border:1px solid rgba(28,124,84,.16);border-radius:999px;background:#f4fbf7;color:var(--brand);font-weight:950;font-size:.84rem;white-space:nowrap}.nav-action-pill:hover,.nav-action-pill.active{background:var(--brand);color:#fff;border-color:var(--brand);box-shadow:0 10px 24px rgba(28,124,84,.16)}.nav-user .btn-logout{white-space:nowrap}button[disabled],.btn[disabled]{opacity:.52;cursor:not-allowed;filter:grayscale(.2)}
.account-security-page{max-width:980px}.account-security-card{padding:30px}.account-lock-icon{width:72px;height:72px;border-radius:24px;display:grid;place-items:center;background:linear-gradient(135deg,#ecfdf3,#fff);border:1px solid rgba(28,124,84,.16);font-size:2rem}.account-profile-strip{display:flex;align-items:center;gap:14px;padding:16px;border:1px solid var(--line);border-radius:24px;background:#fbfdff;margin:18px 0}.account-profile-strip strong{display:block;font-size:1.08rem}.account-profile-strip small{display:block;color:var(--muted);font-weight:800;margin-top:4px}.account-password-form{display:grid;gap:12px;max-width:560px}.account-password-form label{display:grid;gap:6px;font-weight:900}.account-password-form button{justify-self:start}
.grid.five{grid-template-columns:repeat(5,minmax(0,1fr))}.photo-command-page{max-width:1640px;width:min(1640px,98vw)}.photo-command-hero{background:linear-gradient(135deg,#fff,#f2fbf6);overflow:visible}.photo-command-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.photo-command-actions select{min-width:330px;margin:0}.photo-kpi-grid{margin-bottom:18px}.photo-stat-card{text-align:left;border:1px solid var(--line);background:#fff;color:var(--ink);cursor:pointer}.photo-stat-card:hover{transform:translateY(-2px);box-shadow:0 20px 52px rgba(16,24,40,.1);border-color:rgba(28,124,84,.22)}.photo-ops-panel{padding:0;overflow:hidden}.photo-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) 180px 180px auto;gap:10px;align-items:center;padding:18px;border-bottom:1px solid var(--line);background:#fff}.search-box{position:relative}.search-box span{position:absolute;left:14px;top:50%;transform:translateY(-50%);font-weight:950;color:var(--muted)}.search-box input{padding-left:38px;margin:0}.photo-toolbar select{margin:0}.view-switch{display:flex;gap:6px;justify-content:flex-end}.view-switch .btn-light.active{background:var(--brand);color:#fff;border-color:var(--brand)}.photo-status-tabs{display:flex;gap:8px;overflow:auto;padding:12px 18px;border-bottom:1px solid var(--line);background:#fbfdff}.photo-status-tabs button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 13px;font-weight:950;color:#475467;cursor:pointer;white-space:nowrap}.photo-status-tabs button.active,.photo-status-tabs button:hover{background:var(--brand);border-color:var(--brand);color:#fff}.photo-bulk-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;border-bottom:1px solid var(--line);background:#f8fafc}.enterprise-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:16px;padding:18px}.enterprise-photo-card{position:relative;overflow:hidden;border:1px solid var(--line);border-radius:24px;background:#fff;box-shadow:0 14px 36px rgba(16,24,40,.06);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.enterprise-photo-card:hover{transform:translateY(-3px);box-shadow:0 24px 56px rgba(16,24,40,.11);border-color:rgba(28,124,84,.22)}.enterprise-photo-card.pending{border-color:#fedf89}.enterprise-photo-card.winner{border-color:#fdb022;box-shadow:0 18px 50px rgba(253,176,34,.14)}.enterprise-photo-thumb{position:relative;height:220px;background:#eef2f6;cursor:pointer;overflow:hidden}.enterprise-photo-thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s ease}.enterprise-photo-thumb:hover img{transform:scale(1.04)}.photo-status-chip{position:absolute;left:12px;top:12px}.photo-vote-chip{position:absolute;right:12px;bottom:12px;display:inline-flex;align-items:center;min-height:30px;padding:6px 10px;border-radius:999px;background:rgba(15,23,42,.78);color:#fff;font-size:.78rem;font-weight:950;backdrop-filter:blur(8px)}.enterprise-photo-body{display:grid;gap:12px;padding:16px}.photo-title-row{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.photo-title-row h3{margin:0;font-size:1.08rem}.winner-crown{font-size:1.4rem}.photo-caption{margin:0;color:var(--muted);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:42px}.photo-member-line{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:18px;background:#fbfdff}.photo-member-line strong,.photo-member-line small{display:block}.photo-member-line small{margin-top:3px;color:var(--muted);font-weight:800}.photo-card-meta{display:flex;justify-content:space-between;gap:8px;padding:9px 0;border-top:1px solid #eef2f6;border-bottom:1px solid #eef2f6}.photo-card-meta span{color:var(--muted);font-weight:900;font-size:.78rem;text-transform:uppercase}.photo-card-meta strong{font-size:.86rem}.photo-card-actions{display:flex;gap:8px;flex-wrap:wrap}.photo-table-wrap{margin:18px}.photo-pro-table{min-width:1320px}.photo-table-photo{display:flex;align-items:center;gap:12px;min-width:310px;cursor:pointer}.photo-table-photo img{width:76px;height:58px;border-radius:14px;object-fit:cover;background:#eef2f6}.photo-table-photo strong,.photo-table-photo small{display:block}.photo-table-photo small{max-width:360px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pill.gold{background:#fef0c7;color:#b54708}.photo-pagination{display:flex;align-items:center;justify-content:center;gap:14px;padding:4px 18px 22px}.photo-preview-modal{width:min(1280px,96vw)}.photo-preview-layout{display:grid;grid-template-columns:minmax(0,1.35fr) 360px;gap:18px;align-items:start}.photo-preview-image{width:100%;max-height:76vh;object-fit:contain;background:#0f172a;border-radius:22px}.photo-preview-details{display:grid;gap:14px}.photo-preview-details h3{margin:0}.photo-preview-details p{margin:0;color:var(--muted);line-height:1.55}.photo-preview-member{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--line);border-radius:18px;background:#fbfdff}.photo-preview-member strong,.photo-preview-member small{display:block}.photo-preview-member small{color:var(--muted);font-weight:800}.photo-preview-details dl{display:grid;grid-template-columns:100px 1fr;gap:9px 12px;padding:14px;border:1px solid var(--line);border-radius:18px;background:#fff}.photo-preview-details dt{color:var(--muted);font-weight:900}.photo-preview-details dd{margin:0;font-weight:800}.empty-state{grid-column:1/-1;text-align:center;padding:42px 18px;border:1px dashed var(--line);border-radius:24px;background:#fbfdff}.empty-state strong{display:block;font-size:1.2rem;margin-bottom:6px}
@media(max-width:1300px){.grid.five{grid-template-columns:repeat(3,minmax(0,1fr))}.photo-toolbar{grid-template-columns:1fr 1fr}.view-switch{justify-content:flex-start}.photo-preview-layout{grid-template-columns:1fr}.photo-preview-details{grid-row:auto}.photo-command-actions{justify-content:flex-start}.photo-command-actions select{min-width:260px}}
@media(max-width:900px){.nav-user{grid-column:1/-1;width:100%;justify-content:flex-start;flex-wrap:wrap}.nav-action-pill{flex:1 1 auto}.grid.five{grid-template-columns:repeat(2,minmax(0,1fr))}.photo-toolbar{grid-template-columns:1fr}.enterprise-photo-grid{grid-template-columns:1fr;padding:14px}.photo-command-page{width:100%;padding-left:14px;padding-right:14px}.photo-command-actions,.photo-command-actions select,.photo-command-actions .btn{width:100%}.photo-bulk-bar{display:grid}.account-security-card{padding:20px}.account-profile-strip{align-items:flex-start}.photo-status-tabs{padding:10px 14px}.photo-table-wrap{margin:14px}}
@media(max-width:560px){.grid.five{grid-template-columns:1fr}.user-chip{order:1}.nav-action-pill{order:2}.btn-logout{order:3}.enterprise-photo-thumb{height:190px}.photo-card-actions .btn{flex:1}.photo-preview-details dl{grid-template-columns:1fr}.photo-preview-image{max-height:55vh}}

/* Groups, invitations and reward claims upgrade */
.groups-admin-container,
.loyalty-admin-container,
.admin-walks-container { max-width: 1560px; }
.group-management-grid,
.reward-management-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap:16px; }
.group-card,
.reward-rule-card { display:flex; gap:14px; align-items:flex-start; padding:18px; border:1px solid rgba(15,23,42,.08); border-radius:22px; background:linear-gradient(135deg,#fff,#f8fafc); box-shadow:0 16px 45px rgba(15,23,42,.06); }
.group-card-icon,
.reward-card-icon { width:46px; height:46px; display:grid; place-items:center; border-radius:16px; background:#eef2ff; font-size:22px; flex:0 0 auto; }
.group-card-body,
.reward-card-body { flex:1; min-width:0; }
.group-card-body h3,
.reward-card-body strong { margin:8px 0 4px; display:block; font-size:1.05rem; color:#0f172a; }
.group-card-body p,
.reward-card-body p { margin:0 0 8px; color:#64748b; line-height:1.45; }
.group-card-actions { display:flex; flex-direction:column; gap:8px; align-items:flex-end; }
.enterprise-checkbox-list,
.invite-check-list { max-height:520px; overflow:auto; border:1px solid rgba(15,23,42,.1); border-radius:18px; padding:10px; background:#fff; }
.enterprise-checkbox-row,
.invite-check-row { display:flex; gap:12px; align-items:center; padding:10px; border-radius:14px; cursor:pointer; }
.enterprise-checkbox-row:hover,
.invite-check-row:hover { background:#f8fafc; }
.enterprise-checkbox-row input,
.invite-check-row input { width:18px; height:18px; accent-color:#2563eb; }
.invite-check-row > div:not(.identity-cell) { display:flex; flex-direction:column; gap:3px; }
.invite-check-row span,
.enterprise-checkbox-row small { color:#64748b; font-size:.82rem; }
.full-input { width:100%; margin-bottom:10px; }
.modal-xl { max-width:1180px; width:min(1180px,96vw); }
.invite-builder { margin:14px 0; padding:16px; border:1px solid rgba(37,99,235,.15); background:#f8fbff; border-radius:20px; }
.invite-builder-head { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:12px; }
.invite-builder-head strong { color:#0f172a; }
.invite-builder-head span { color:#64748b; font-size:.9rem; }
.invite-builder select[multiple] { min-height:145px; }
.invite-modal-grid { align-items:start; }
.mini-head { margin-bottom:8px; }
.enterprise-walk-card { border-left:5px solid #2563eb; }
.rewards-admin-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items:start; }
.rewards-claims-wrap { max-height:560px; overflow:auto; }
.client-reward-card { display:grid; grid-template-columns:auto 1fr auto; gap:14px; align-items:center; padding:16px; border:1px solid rgba(15,23,42,.08); border-radius:20px; background:#fff; box-shadow:0 12px 34px rgba(15,23,42,.05); }
.client-reward-card h3 { margin:0 0 4px; }
.client-reward-card p { margin:0 0 8px; color:#64748b; }
.client-reward-card.is-disabled { opacity:.62; }
.reward-store-grid { display:grid; gap:12px; }
.reward-store-header { margin-bottom:12px; }
.loyalty-wallet { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-radius:18px; background:linear-gradient(135deg,#0f172a,#1e3a8a); color:#fff; }
.loyalty-wallet span { opacity:.78; }
.loyalty-wallet strong { font-size:1.8rem; }
.reward-claim-history { margin-top:14px; max-height:240px; overflow:auto; }
.btn-danger { background:#dc2626 !important; color:#fff !important; border-color:#dc2626 !important; }
@media (max-width: 980px) {
  .rewards-admin-grid { grid-template-columns:1fr; }
  .group-card,
  .reward-rule-card,
  .client-reward-card { grid-template-columns:1fr; display:block; }
  .group-card-actions { flex-direction:row; align-items:center; margin-top:12px; }
}

/* System user create/edit password visibility control */
.password-inline-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.password-inline-control input {
  width: 100%;
}
.password-toggle-btn {
  height: 48px;
  min-width: 76px;
  justify-content: center;
  white-space: nowrap;
}
