@font-face{
  font-family:'PokemonSolid';
  src:url('PokemonSolid.ttf') format('truetype');
}

:root{
  --bg:#edf5fb;
  --card:#ffffff;
  --border:#dbe3ea;
  --text:#17324d;
  --muted:#607d8b;
  --teal:#00796B;
  --teal-soft:rgba(0,121,107,0.08);
  --pokemon-blue:#2a75bb;
  --pokemon-yellow:#ffcb05;
  --vault-ink:#17324d;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  background:
    linear-gradient(135deg,rgba(42,117,187,.08),rgba(255,203,5,.06) 45%,rgba(0,121,107,.05)),
    var(--bg);
  color:var(--text);
}
.app{
  display:flex;
  min-height:100vh;
}
.sidebar{
  width:260px;
  background:#fff;
  border-right:1px solid var(--border);
  padding:24px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.logo{
  font-family:'PokemonSolid', Arial, sans-serif;
  font-size:28px;
  font-weight:900;
  letter-spacing:.5px;
  margin-bottom:24px;
  line-height:1;
}
.logo .grade{
  color:#ffcb05;
  text-shadow:-1px -1px 0 #2a75bb,1px -1px 0 #2a75bb,-1px 1px 0 #2a75bb,1px 1px 0 #2a75bb;
}
.logo .vault{
  color:#3b82f6;
  text-shadow:-1px -1px 0 #ffcb05,1px -1px 0 #ffcb05,-1px 1px 0 #ffcb05,1px 1px 0 #ffcb05;
}
.sidebar nav{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.sidebar a{
  color:var(--text);
  text-decoration:none;
  padding:12px 14px;
  border-radius:12px;
  transition:all .25s ease;
  border:1px solid transparent;
}
.sidebar a:hover{
  background:linear-gradient(135deg,var(--teal-soft),rgba(0,121,107,0.03));
  border-color:rgba(0,121,107,0.2);
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(0,0,0,0.06);
  color:var(--teal);
}
.sidebar a.active{
  background:var(--teal-soft);
  border-color:rgba(0,121,107,0.24);
  color:var(--teal);
  font-weight:800;
}
.content{
  flex:1;
  display:flex;
  flex-direction:column;
}
.page-header{
  background:rgba(255,255,255,.9);
  border-bottom:1px solid var(--border);
  padding:24px 32px;
  backdrop-filter:blur(10px);
}
.page-header h1{
  margin:0;
  font-size:20px;
  color:#607d8b;
  font-weight:800;
  letter-spacing:.02em;
  text-transform:uppercase;
}
main{
  padding:32px;
}
.panel{
  background:rgba(255,255,255,.92);
  border:1px solid var(--border);
  border-radius:8px;
  padding:24px;
  box-shadow:0 12px 30px rgba(23,50,77,.07);
}
table{
  width:100%;
  border-collapse:collapse;
  margin-top:16px;
}
th,td{
  padding:12px;
  border-bottom:1px solid #edf1f5;
  text-align:left;
}
input,select{
  width:100%;
  padding:10px 12px;
  border:1px solid #d1d9e0;
  border-radius:10px;
  background:#fff;
  min-height:42px;
  line-height:1.2;
  top:0;
}
button{
  padding:10px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  cursor:pointer;
}
button:hover{
  box-shadow:0 4px 10px rgba(0,0,0,.06);
}


.site-footer{
  margin-top:auto;
  padding:18px 32px 24px;
  font-size:12px;
  color:#9aa4af;
  border-top:1px solid #edf1f5;
  background:#fafbfd;
}


.site-footer{
  width:100%;
  padding:18px 32px 24px;
  font-size:12px;
  color:#9aa4af;
  border-top:1px solid #edf1f5;
  background:#fafbfd;
}


.site-footer{
  text-align:center;
}


.site-footer{
  padding:8px 24px 10px !important;
  line-height:1.3;
}


.page-header{
  position:relative;
}
.page-header h1{
  margin:0;
}
.header-stat-box{
  position:absolute;
  right:32px;
  top:50%;
  transform:translateY(-50%);
  min-width:220px;
  background:#fff;
  border:1px solid #dbe3ea;
  border-radius:12px;
  padding:8px 14px;
  text-align:center;
  box-shadow:0 2px 8px rgba(0,0,0,0.04);
}
.header-stat-label{
  font-size:11px;
  color:#607d8b;
  line-height:1.1;
}
.header-stat-value{
  font-size:22px;
  font-weight:700;
  line-height:1.1;
}


/* Header stat card style inspired by provided reference */
.header-stat-box{
  position:absolute;
  right:32px;
  top:50%;
  transform:translateY(-50%);
  min-width:320px;
  padding:14px 18px;
  border-radius:16px;
  background:linear-gradient(135deg,#1e88e5,#42a5f5);
  color:#ffffff;
  box-shadow:0 10px 24px rgba(66,165,245,0.25);
  border:none;
  text-align:left;
}
.header-stat-label{
  font-size:11px;
  color:rgba(255,255,255,0.9);
  text-align:center;
  margin-bottom:6px;
}
.header-stat-value{
  font-size:28px;
  font-weight:800;
  color:#fff;
  text-align:center;
}


.search-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:18px;
}
.search-card{
  background:#fff;
  border:1px solid #dbe3ea;
  border-radius:16px;
  padding:16px;
  box-shadow:0 4px 12px rgba(0,0,0,0.04);
}
.search-card img{
  width:100%;
  border-radius:12px;
  margin-bottom:12px;
}
.search-card h3{
  margin:0 0 8px;
  font-size:16px;
}

.search-list{display:flex;flex-direction:column;gap:10px}
.search-row{
 display:grid;
 grid-template-columns:2fr 1fr 1fr;
 gap:12px;
 padding:14px 16px;
 border:1px solid #dbe3ea;
 border-radius:12px;
 text-decoration:none;
 color:inherit;
 background:#fff;
}
.search-row:hover{box-shadow:0 4px 10px rgba(0,0,0,.05)}

.slab-overlay{
 display:none;position:fixed;inset:0;background:rgba(15,23,42,.45);
 z-index:9999;align-items:center;justify-content:center;padding:24px;
}
.slab-overlay.open{display:flex}
.slab-modal{
 background:#fff;border-radius:20px;padding:24px;max-width:520px;width:100%;
 box-shadow:0 20px 60px rgba(0,0,0,.18);
}

.dashboard-hero{
 display:flex;
 align-items:flex-end;
 justify-content:space-between;
 gap:24px;
 margin-bottom:22px;
 padding:28px;
 background:
   linear-gradient(110deg,rgba(255,255,255,.96),rgba(234,246,255,.94) 58%,rgba(255,248,210,.88)),
   #fff;
 border:1px solid rgba(42,117,187,.18);
 border-left:6px solid var(--pokemon-yellow);
 border-radius:8px;
 box-shadow:0 18px 38px rgba(42,117,187,.12);
}
.dashboard-hero h2{
 margin:6px 0 8px;
 font-size:30px;
 line-height:1.15;
 color:var(--pokemon-blue);
 font-weight:900;
}
.dashboard-hero p{
 margin:0;
 color:#607d8b;
 max-width:680px;
}
.eyebrow{
 margin:0;
 color:#00796B !important;
 font-size:12px;
 font-weight:800;
 text-transform:uppercase;
 letter-spacing:.08em;
}
.dashboard-actions{
 display:flex;
 gap:10px;
 align-items:center;
 flex:0 0 auto;
}
.dashboard-link{
 text-decoration:none;
 display:inline-flex;
 align-items:center;
 justify-content:center;
}
.secondary-action{
 color:#1e88e5;
 font-weight:800;
 padding:10px 14px;
}
.dashboard-stats{
 display:grid;
 grid-template-columns:repeat(4,minmax(0,1fr));
 gap:16px;
 margin-bottom:22px;
}
.metric-card{
 background:rgba(255,255,255,.94);
 border:1px solid rgba(42,117,187,.16);
 border-radius:8px;
 padding:18px;
 box-shadow:0 12px 24px rgba(23,50,77,.06);
 position:relative;
 overflow:hidden;
}
.metric-card:before{
 content:"";
 position:absolute;
 left:0;
 top:0;
 right:0;
 height:4px;
 background:linear-gradient(90deg,rgba(255,203,5,.8),rgba(42,117,187,.45));
}
.metric-card-vault{
 background:linear-gradient(90deg,#2a75bb 0%,#8fc8ff 100%);
 border-color:#2a75bb;
 color:#fff;
}
.metric-card-vault span{
 color:rgba(255,255,255,.9);
}
.metric-card-vault strong{
 color:#fff;
}
.metric-card span{
 display:block;
 color:#607d8b;
 font-size:13px;
 margin-bottom:8px;
}
.metric-card strong{
 display:block;
 font-size:28px;
 line-height:1;
}
.metric-card small{
 display:block;
 margin-top:8px;
 color:#48606f;
 font-weight:800;
 line-height:1.25;
}
.metric-card-public{
 background:linear-gradient(90deg,rgba(255,203,5,.92),rgba(255,244,185,.96)) !important;
 border-color:rgba(255,203,5,.72) !important;
}
.metric-card-value{
 background:linear-gradient(90deg,rgba(42,117,187,.16),rgba(255,255,255,.94) 58%,rgba(255,203,5,.18)) !important;
 border-color:rgba(42,117,187,.24) !important;
}
.metric-card-popular{
 background:linear-gradient(90deg,rgba(42,117,187,.88),rgba(126,190,246,.88)) !important;
 border-color:rgba(42,117,187,.5) !important;
 color:#fff;
}
.metric-card-popular span,
.metric-card-popular strong,
.metric-card-popular small{
 color:#fff !important;
}
.popular-slab-mini{
 display:grid;
 grid-template-columns:44px 1fr;
 align-items:center;
 gap:10px;
 min-height:54px;
 margin-top:8px;
}
.popular-slab-mini img,
.popular-slab-mini em{
 width:44px;
 height:54px;
 border-radius:8px;
 object-fit:cover;
 background:rgba(255,255,255,.18);
 box-shadow:0 8px 18px rgba(10,24,38,.18);
}
.popular-slab-mini em{
 display:grid;
 place-items:center;
 color:#fff;
 font-style:normal;
 font-weight:900;
}
.popular-slab-mini small{
 margin-top:0;
 display:-webkit-box;
 -webkit-line-clamp:2;
 -webkit-box-orient:vertical;
 overflow:hidden;
}
.dashboard-grid{
 display:grid;
 grid-template-columns:2fr 1fr;
 gap:18px;
}
.dashboard-panel{
 min-height:280px;
 border-top:4px solid rgba(42,117,187,.18);
}
.panel-heading{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:12px;
 margin-bottom:16px;
}
.panel-heading h3{
 margin:0;
 font-size:20px;
 color:var(--vault-ink);
}
.panel-heading a{
 color:#1e88e5;
 font-weight:800;
 text-decoration:none;
}
.recent-slab-list{
 display:grid;
 gap:12px;
}
.recent-slab-item{
 display:grid;
 grid-template-columns:58px 1fr;
 gap:12px;
 align-items:center;
 padding:10px;
 border:1px solid rgba(42,117,187,.12);
 border-radius:8px;
 background:rgba(255,255,255,.88);
}
.recent-slab-item img,
.slab-thumb-placeholder{
 width:58px;
 height:78px;
 border-radius:8px;
 object-fit:cover;
 background:#edf1f5;
}
.slab-thumb-placeholder{
 display:flex;
 align-items:center;
 justify-content:center;
 color:#607d8b;
 font-weight:900;
}
.recent-slab-item strong,
.recent-slab-item span,
.recent-slab-item small{
 display:block;
}
.recent-slab-item span{
 margin-top:4px;
 color:#263238;
}
.recent-slab-item small{
 margin-top:3px;
 color:#607d8b;
}
.grader-list{
 display:grid;
 gap:10px;
}
.grader-row{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:12px;
 padding:12px 0;
 border-bottom:1px solid #edf1f5;
}
.grader-row:last-child{
 border-bottom:none;
}
.grader-row strong{
 min-width:36px;
 text-align:center;
 color:#00796B;
}
.empty-state{
 color:#607d8b;
 margin:0;
}

@media (max-width: 980px){
 .dashboard-hero{
   align-items:flex-start;
   flex-direction:column;
 }
 .dashboard-stats{
   grid-template-columns:repeat(2,minmax(0,1fr));
 }
 .dashboard-grid{
   grid-template-columns:1fr;
 }
}

@media (max-width: 720px){
 .app{
   flex-direction:column;
 }
 .sidebar{
   width:100%;
   border-right:none;
   border-bottom:1px solid var(--border);
 }
 .sidebar nav{
   display:grid;
   grid-template-columns:repeat(2,minmax(0,1fr));
 }
 .page-header{
   align-items:flex-start !important;
   flex-direction:column;
 }
 .gv-header-tools{
   width:100%;
   align-items:flex-start;
   flex-direction:column;
   padding-right:0 !important;
 }
 .stat-box{
   min-width:0;
   width:100%;
 }
 main{
   padding:20px;
 }
 .dashboard-stats{
   grid-template-columns:1fr;
 }
 .dashboard-hero{
   padding:22px;
 }
 .dashboard-hero h2{
   font-size:24px;
 }
}

/* Header-only navigation: sidebar removed */
.app{
  display:block !important;
  min-height:100vh;
}
.content{
  min-height:100vh;
}
.gv-premium-header{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:20px;
  position:relative !important;
}
.gv-header-left{
  display:flex;
  align-items:center;
  gap:22px;
  min-width:0;
}
.header-brand{
  flex:0 0 auto;
  font-family:'PokemonSolid', Arial, sans-serif;
  font-size:39px;
  font-weight:900;
  line-height:1;
  text-decoration:none;
}
.header-brand .grade{
  color:#ffcb05;
  text-shadow:-1px -1px 0 #2a75bb,1px -1px 0 #2a75bb,-1px 1px 0 #2a75bb,1px 1px 0 #2a75bb;
}
.header-brand .vault{
  color:#3b82f6;
  text-shadow:-1px -1px 0 #ffcb05,1px -1px 0 #ffcb05,-1px 1px 0 #ffcb05,1px 1px 0 #ffcb05;
}
.page-header h1,
.gv-header-title h1{
  padding-right:0 !important;
  white-space:nowrap;
}
.gv-header-tools{
  margin-left:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:14px !important;
  padding-right:0 !important;
  flex-wrap:wrap;
}
.header-nav{
  display:flex;
  align-items:center;
  gap:8px;
}
.header-nav a,
.user-box{
  color:#334155;
  text-decoration:none;
  font-weight:800;
  padding:10px 12px;
  border:1px solid #dbe3ea;
  border-radius:8px;
  background:#fff;
}
.header-nav .search-icon-link{
  width:42px;
  height:42px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  line-height:1;
}
.header-nav a:hover,
.user-box:hover{
  color:#00796B;
  border-color:rgba(0,121,107,0.24);
}
.language-form{
  margin:0;
}
.language-form select{
  width:auto;
  min-width:72px;
  height:42px;
  min-height:42px;
  padding:6px 10px;
  border-radius:8px;
  font-size:22px;
  font-weight:800;
  line-height:1;
}
.gv-header-tools .stat-box{
  min-width:210px;
  border-radius:8px;
  padding:9px 16px;
}
.gv-header-tools .stat-box small{
  font-size:11px;
}
.gv-header-tools .stat-box strong{
  font-size:20px;
}
.user-menu{
  margin-left:0 !important;
}

@media (max-width: 900px){
  .gv-premium-header{
    align-items:flex-start !important;
    flex-direction:column;
  }
  .gv-header-left{
    width:100%;
    justify-content:space-between;
  }
  .gv-header-tools{
    width:100%;
    justify-content:flex-start !important;
  }
}

@media (max-width: 560px){
  .gv-header-left{
    align-items:flex-start;
    flex-direction:column;
    gap:10px;
  }
  .page-header h1,
  .gv-header-title h1{
    white-space:normal;
  }
  .gv-header-tools .stat-box{
    width:100%;
  }
}

/* Overlay refined to card proportions */
.slab-modal{
  background:transparent;
  padding:0;
  max-width:540px;
  width:100%;
  box-shadow:none;
}
.slab-detail-card{
  display:grid;
  grid-template-columns:100px 1fr;
  gap:18px;
  align-items:center;
  background:linear-gradient(90deg,#f4f1e8,#f8f6ef);
  border:2px solid #e0b800;
  border-radius:28px;
  padding:14px 18px;
  box-shadow:0 8px 24px rgba(224,184,0,.15);
}
.slab-detail-image{
  width:100px;
  height:auto;
  border-radius:8px;
}
.slab-detail-content h2{
  margin:0;
  font-size:18px;
  color:#333;
}
.slab-detail-cert{
  margin-top:6px;
  color:#777;
  font-size:14px;
}
.slab-detail-grader{
  margin-top:10px;
  color:#0b7a5a;
  font-size:26px;
  font-weight:800;
}

/* Corrected overlay proportions: keep previous dimensions feel, only narrower like a card */
.slab-modal{
  max-width:420px !important;
  width:100%;
}
.slab-detail-card{
  grid-template-columns:120px 1fr;
  gap:16px;
  padding:16px 18px;
}
.slab-detail-image{
  width:120px;
}
.slab-detail-content h2{
  font-size:20px;
}
.slab-detail-grader{
  font-size:24px;
}

/* Vertical card-like overlay */
.slab-modal{
  max-width:340px !important;
  width:100%;
}
.slab-detail-card.vertical{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding:18px;
}
.slab-detail-image.vertical{
  width:180px;
  max-width:100%;
  margin-bottom:14px;
}
.slab-detail-content.vertical{
  width:100%;
}
.slab-detail-content.vertical h2{
  margin:0;
  font-size:20px;
}

.primary-btn{
  background:linear-gradient(135deg,#1e88e5,#42a5f5);
  color:#fff;border:none;border-radius:12px;padding:12px 18px;font-weight:700;
  box-shadow:0 8px 18px rgba(66,165,245,.22);
}
.collection-modal{
  max-width:520px !important;
  background:#fff;
  border-radius:24px;
  padding:24px;
}
.slab-form{
  display:grid;
  gap:12px;
}
.slab-form-panel{
  max-width:720px;
}
.slab-form label{
  display:grid;
  gap:6px;
  font-weight:700;
}
.slab-form label input,
.slab-form label select{
  font-weight:400;
  min-height:42px;
  height:42px;
  line-height:1.2;
  padding-top:10px;
  padding-bottom:10px;
  position:relative;
  top:0;
}
.slab-form label input[type="file"]{
  height:auto;
  min-height:42px;
}
.slab-form .inline-check{
  display:flex;
  align-items:center;
  gap:10px;
}
.slab-form .inline-check input{
  width:auto;
}
.slab-form h2{
  margin:0 0 8px 0;
}
.api-front-preview{
  display:grid;
  grid-template-columns:72px 1fr;
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid #dbe3ea;
  border-radius:8px;
  background:#f8fbfd;
}
.api-front-preview[hidden]{
  display:none;
}
.api-front-preview img{
  width:72px;
  aspect-ratio:3/4;
  object-fit:cover;
  border-radius:8px;
  background:#edf1f5;
}
.api-front-preview small{
  color:#607d8b;
  font-weight:800;
  line-height:1.35;
}

.collection-grid{
 display:grid;
 grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
 gap:18px;
 margin-top:24px;
}
.collection-toolbar{
 display:flex;
 justify-content:flex-end;
 margin-bottom:16px;
}
.new-slab-inline{
 display:none;
 margin-bottom:24px;
}
.new-slab-inline.open{
 display:block;
}
.collection-errors{
 margin-bottom:16px;
 color:#b91c1c;
}
.my-slab-card{
 background:#fff;
 border:1px solid #dbe3ea;
 border-radius:18px;
 padding:16px;
 box-shadow:0 4px 12px rgba(0,0,0,.04);
}
.slab-image-wrap{
 position:relative;
 min-height:220px;
 margin-bottom:12px;
}
.my-slab-card img{
 width:100%;
 border-radius:12px;
 display:block;
 object-fit:cover;
}
.slab-card-placeholder{
 min-height:220px;
 border-radius:12px;
 background:#edf1f5;
 color:#607d8b;
 display:flex;
 align-items:center;
 justify-content:center;
 font-size:34px;
 font-weight:900;
}
.slab-public-badge{
 position:absolute;
 left:10px;
 top:10px;
 padding:5px 8px;
 border-radius:8px;
 background:rgba(15,23,42,.78);
 color:#fff;
 font-size:11px;
 font-weight:800;
}
.slab-public-badge.is-public{
 background:#00796B;
}
.my-slab-card h3{margin:0 0 8px;font-size:16px;line-height:1.25}
.slab-meta{
 display:grid;
 gap:5px;
 color:#607d8b;
 font-size:13px;
}
.slab-price{
 margin-top:10px;
 font-weight:800;
 color:#263238;
}

.auth-box{max-width:460px;margin:20px auto}
.auth-form{display:grid;gap:14px}
.secondary-link{text-align:center;text-decoration:none;color:#1e88e5;font-weight:700}
.auth-error{color:#b91c1c;margin-bottom:10px}
.auth-help{
  margin:0 0 12px;
  color:#607d8b;
  font-weight:800;
}
.auth-resend-form{
  margin-top:10px;
}

.header-auth-link{
  position:absolute;
  right:32px;
  top:50%;
  transform:translateY(-50%);
  z-index:2;
  font-weight:700;
}
.header-auth-link a{
  color:#ffffff;
  text-decoration:none;
}

/* move auth link outside and after stat card */
.header-auth-link{
  position:absolute;
  right:-170px !important;
  top:50%;
  transform:translateY(-50%);
  z-index:3;
  font-weight:700;
  white-space:nowrap;
}
.header-auth-link a,
.header-auth-link{
  color:#334155 !important;
}
.page-header{
  overflow:visible !important;
}

.header-stat-box{right:190px !important;}
.header-auth-link{position:absolute !important;right:32px !important;top:50% !important;transform:translateY(-50%) !important;display:block !important;white-space:nowrap;}

.user-menu{
  position:absolute;
  right:32px;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  gap:10px;
}
.user-avatar{
  width:36px;height:36px;border-radius:50%;
  background:#fff;color:#1e88e5;font-weight:800;
  display:flex;align-items:center;justify-content:center;
  border:2px solid #dbe3ea;
}
.user-name-toggle{font-weight:700;cursor:pointer}
.user-dropdown{
  display:none;
  position:absolute;
  top:44px;right:0;
  background:#fff;border:1px solid #dbe3ea;
  border-radius:12px;padding:8px 0;min-width:140px;
  box-shadow:0 8px 20px rgba(0,0,0,.08);
}
.user-dropdown.open{display:block}
.user-dropdown a{display:block;padding:10px 14px;color:#334155;text-decoration:none}

.user-details{position:relative}
.user-details summary{list-style:none;cursor:pointer}
.user-details summary::-webkit-details-marker{display:none}
.user-details:not([open]) .user-dropdown{display:none}

/* force username dropdown clickable above stat box */
.user-menu{
  z-index:9999 !important;
}
.user-details{
  position:relative;
  z-index:9999 !important;
}
.user-name-toggle{
  display:inline-block !important;
  position:relative;
  z-index:9999 !important;
  pointer-events:auto !important;
}
.header-stat-box{
  z-index:1 !important;
}

.slab-edit-form{display:grid;gap:10px}
.slab-edit-form label{
 display:grid;
 gap:5px;
 font-size:12px;
 font-weight:800;
 color:#607d8b;
}
.slab-edit-form label input,
.slab-edit-form label select{
 font-size:14px;
 color:#263238;
 font-weight:400;
}
.slab-actions{display:flex;gap:10px}
.switch-row{display:flex;align-items:center;justify-content:center;gap:10px;font-size:14px}
.switch-row input{width:44px;height:22px}

.ios-switch-wrap{position:relative;display:inline-block;width:52px;height:30px}
.ios-switch-input{opacity:0;width:0;height:0}
.ios-switch-slider{
 position:absolute;cursor:pointer;inset:0;background:#cbd5e1;border-radius:999px;transition:.25s;
}
.ios-switch-slider:before{
 content:"";position:absolute;height:24px;width:24px;left:3px;top:3px;background:white;border-radius:50%;transition:.25s;
 box-shadow:0 2px 6px rgba(0,0,0,.18);
}
.ios-switch-input:checked + .ios-switch-slider{background:#22c55e}
.ios-switch-input:checked + .ios-switch-slider:before{transform:translateX(22px)}

/* smaller switch bottom-right inside slab card */
.my-slab-card{position:relative}
.switch-row{
  position:absolute;
  right:12px;
  bottom:12px;
  justify-content:flex-end !important;
  gap:8px;
  font-size:12px;
}
.ios-switch-wrap{
  width:40px !important;
  height:22px !important;
}
.ios-switch-slider:before{
  width:16px !important;
  height:16px !important;
  left:3px !important;
  top:3px !important;
}
.ios-switch-input:checked + .ios-switch-slider:before{
  transform:translateX(18px) !important;
}

.slab-text{margin-top:10px;padding:10px 12px;border:1px solid #d1d9e0;border-radius:10px;background:#fff;font-size:14px}
.card-bottom-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;flex-wrap:wrap}
.switch-form{margin-left:auto;display:flex;align-items:center;gap:6px}
.pub-label{font-size:12px}

.slab-detail-images{
  display:grid;
  gap:8px;
  justify-content:center;
  align-items:center;
  width:100%;
}
.slab-detail-images .slab-detail-image.vertical{
  width:190px;
  max-height:min(48vh,360px);
  margin-bottom:8px;
  object-fit:contain;
}
.slab-flip-frame{
  position:relative;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  justify-self:center;
}
.slab-flip-btn{
  position:absolute;
  right:8px;
  bottom:14px;
  z-index:2;
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:2px solid rgba(255,203,5,.92);
  border-radius:999px;
  background:rgba(42,117,187,.92);
  color:#fff;
  font-size:22px;
  font-weight:900;
  line-height:1;
  box-shadow:0 10px 22px rgba(10,24,38,.22);
  cursor:pointer;
}
.slab-flip-btn:hover,
.slab-flip-frame.is-back .slab-flip-btn{
  background:#ffcb05;
  color:#17324d;
  border-color:#2a75bb;
}
.slab-detail-price{
  margin-top:10px;
  color:#334155;
  font-weight:800;
}
.cert-link{
  display:inline-flex;
  margin-top:12px;
  color:#1e88e5;
  font-weight:800;
  text-decoration:none;
}

.delete-confirm{display:flex;gap:6px}
.delete-wrap{display:flex;align-items:center}

.delete-overlay{
 display:none;position:absolute;inset:0;
 background:rgba(15,23,42,.45);
 border-radius:18px;
 align-items:center;justify-content:center;
}
.delete-overlay.open{display:flex}
.delete-modal{
 background:#fff;padding:18px;border-radius:16px;
 box-shadow:0 10px 30px rgba(0,0,0,.15);
 width:85%;max-width:260px;text-align:center;
}
.delete-title{font-size:14px;font-weight:700;margin-bottom:12px}
.delete-actions{display:flex;justify-content:center;gap:10px}

.trash-actions-cell{text-align:right;white-space:nowrap;position:relative}
.trash-inline-form{display:inline}
.icon-btn{
  border:none;background:transparent;font-size:18px;cursor:pointer;
  padding:4px 6px;
}

/* fix stray username duplicate outside header */
.page-header{position:relative}
body > .user-menu{display:none !important;}
.content > .user-menu{display:none !important;}
.user-menu{top:auto !important; bottom:auto !important;}

.header-right{display:flex;gap:16px;align-items:center}
.user-menu{display:flex;align-items:center;gap:10px;position:relative}
.user-details{position:relative}
.user-name-toggle{cursor:pointer;font-weight:700;list-style:none}
.user-name-toggle::-webkit-details-marker{display:none}
.user-dropdown{position:absolute;right:0;top:36px;background:#fff;border:1px solid #dbe3ea;border-radius:12px;padding:8px 0;min-width:150px;display:none;z-index:20}
.user-details[open] .user-dropdown{display:block}
.user-dropdown a{display:block;padding:8px 12px;color:#334155;text-decoration:none}

/* restored premium header layout */
.page-header{display:flex;justify-content:space-between;align-items:center;padding:20px 32px;background:#fff;border-bottom:1px solid #dbe3ea}
.page-header h1{margin:0;font-size:28px}
.header-right{margin-left:auto;display:flex;align-items:center;gap:18px}
.stat-box{min-width:320px;background:linear-gradient(135deg,#1e88e5,#42a5f5);color:#fff;border-radius:18px;padding:10px 22px;text-align:center;box-shadow:0 8px 24px rgba(30,136,229,.18)}
.stat-box small{display:block;font-size:13px}
.stat-box strong{display:block;font-size:22px}
.user-menu{display:flex;align-items:center;gap:10px;position:relative}
.user-avatar{width:54px;height:54px;border-radius:50%;border:2px solid #dbe3ea;display:flex;align-items:center;justify-content:center;font-weight:800;color:#1e88e5;background:#fff;font-size:22px}
.user-avatar img{
  width:100%;
  height:100%;
  border-radius:50%;
  object-fit:cover;
}
.user-details{position:relative}
.user-name-toggle{cursor:pointer;font-weight:700;list-style:none}
.user-name-toggle::-webkit-details-marker{display:none}
.user-dropdown{position:absolute;right:0;top:34px;background:#fff;border:1px solid #dbe3ea;border-radius:12px;min-width:150px;padding:8px 0;display:none;box-shadow:0 10px 25px rgba(0,0,0,.08);z-index:30}
.user-details[open] .user-dropdown{display:block}
.user-dropdown a{display:block;padding:8px 12px;text-decoration:none;color:#334155}

/* force premium header block flush right */
.page-header{position:relative}
.header-right{
  margin-left:auto !important;
  justify-content:flex-end !important;
  width:auto !important;
  position:absolute !important;
  right:32px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
}
.page-header h1{padding-right:520px}

/* hard rebuild premium header alignment */
.gv-premium-header{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:24px;
}
.gv-header-title{flex:1 1 auto; min-width:0;}
.gv-header-tools{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:16px;
  flex:0 0 auto;
}
.gv-header-title h1{margin:0;}

/* final spacing fix between counter and profile */
.gv-header-tools{
  gap:28px !important;
  padding-right:24px !important;
}
.user-menu{
  margin-left:8px !important;
}

/* Final header, dashboard, and advanced search overrides */
.gv-premium-header{
  align-items:center !important;
}
.gv-header-tools{
  gap:14px !important;
  padding-right:0 !important;
}
.gv-header-tools .language-form{
  margin-right:34px;
}
.language-form select{
  min-width:72px;
  text-align:center;
}
.user-menu{
  align-items:center !important;
  margin-left:0 !important;
}
.user-avatar{
  flex:0 0 auto;
}
.user-name-toggle{
  display:grid !important;
  gap:4px;
  line-height:1.1;
}
.user-level-badge{
  display:inline-flex;
  width:max-content;
  padding:4px 7px;
  border-radius:8px;
  color:#263238;
  font-size:11px;
  font-weight:900;
}
.level-rookie{background:#edf1f5}
.level-collector{background:#fff4b8}
.level-elite{background:#d8ecff}
.level-master{background:#ffe28a}
.level-id-0{background:#ffe28a}
.level-id-1{background:#d8ecff}
.level-id-2{background:#fff4b8}
.level-id-3{background:#eef6ff}
.level-id-4{background:#fff9db}
.level-id-5{background:#edf1f5}
.grader-row.percent-row{
  position:relative;
  overflow:hidden;
  min-height:44px;
  padding:0 12px;
  border:1px solid #edf1f5;
  border-radius:8px;
}
.grader-row.percent-row .percent-fill{
  position:absolute;
  inset:0 auto 0 0;
  z-index:0;
}
.grader-row.yellow-row .percent-fill{
  background:linear-gradient(90deg,rgba(255,203,5,.45),rgba(255,255,255,.85));
}
.grader-row.blue-row .percent-fill{
  background:linear-gradient(90deg,rgba(42,117,187,.28),rgba(255,255,255,.85));
}
.grader-row.percent-row .grader-name,
.grader-row.percent-row strong{
  position:relative;
  z-index:1;
}
.search-panel{
  margin-bottom:18px;
}
.advanced-search-form{
  display:grid;
  grid-template-columns:minmax(420px, 1fr) auto;
  gap:14px;
  align-items:start;
}
.advanced-search-form label{
  display:grid;
  gap:6px;
  color:#607d8b;
  font-size:12px;
  font-weight:800;
}
.advanced-search-form input,
.advanced-search-form select{
  color:#263238;
  font-size:14px;
  font-weight:400;
  min-height:42px;
  line-height:1.2;
  padding-top:10px;
  padding-bottom:10px;
}
.advanced-search-form select{
  position:relative;
  top:0;
  height:42px;
}
.search-main-field{
  display:grid;
  gap:6px;
}
.search-main-field label{
  display:grid;
  gap:6px;
  color:#607d8b;
  font-size:12px;
  font-weight:800;
}
.advanced-search-form .search-wide{
  grid-column:auto;
}
.advanced-fields{
  display:none;
  grid-column:1 / -1;
  grid-template-columns:minmax(180px,1fr) 140px minmax(180px,1fr) minmax(180px,1fr);
  gap:14px;
  align-items:end;
  padding-top:14px;
  border-top:1px solid #edf1f5;
}
.advanced-fields.open{
  display:grid;
}
.grade-range-field{
  display:grid;
  gap:6px;
  color:#607d8b;
  font-size:12px;
  font-weight:800;
}
.grade-range-inputs{
  display:grid;
  grid-template-columns:64px 64px;
  gap:8px;
}
.grade-range-inputs label{
  gap:3px;
}
.grade-range-inputs input{
  padding-left:8px;
  padding-right:8px;
  text-align:center;
}
.search-actions{
  display:flex;
  align-items:center;
  gap:12px;
  padding-top:24px;
}
.search-actions a{
  color:#1e88e5;
  font-weight:800;
  padding:0;
  text-decoration:none;
}
.advanced-toggle{
  width:100%;
  min-height:auto;
  padding:7px 0 0;
  border:none;
  background:transparent;
  box-shadow:none;
  font-weight:800;
  color:#2a75bb;
  text-align:center;
}
.advanced-toggle:hover{
  box-shadow:none;
  color:#00796B;
}
.search-result-summary{
  margin:0 0 14px;
  color:#607d8b;
  font-weight:800;
}
.tcg-results-panel{
  margin:0 0 18px;
  padding:18px;
  border:1px solid rgba(42,117,187,.16);
  border-radius:8px;
  background:linear-gradient(135deg,rgba(255,203,5,.18),rgba(255,255,255,.96) 45%,rgba(42,117,187,.1));
  box-shadow:0 10px 26px rgba(23,50,77,.06);
}
.tcg-results-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.tcg-results-heading span{
  display:block;
  margin-bottom:3px;
  color:#2a75bb;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}
.tcg-results-heading h2{
  margin:0;
  color:#263238;
  font-size:22px;
}
.tcg-results-heading small{
  color:#607d8b;
  font-weight:900;
}
.tcg-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
  gap:14px;
}
.tcg-card{
  display:grid;
  grid-template-columns:74px 1fr;
  gap:12px;
  align-items:center;
  padding:12px;
  border:1px solid #dbe3ea;
  border-radius:8px;
  background:rgba(255,255,255,.88);
}
.tcg-card img,
.tcg-card-placeholder{
  width:74px;
  aspect-ratio:3/4;
  border-radius:8px;
  object-fit:cover;
  background:#edf1f5;
}
.tcg-card-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#607d8b;
  font-weight:900;
}
.tcg-card-copy strong,
.tcg-card-copy span,
.tcg-card-copy small,
.tcg-card-copy em{
  display:block;
}
.tcg-card-copy strong{
  color:#263238;
}
.tcg-card-copy span{
  margin-top:4px;
  color:#2a75bb;
  font-weight:800;
}
.tcg-card-copy small{
  margin-top:3px;
  color:#607d8b;
}
.tcg-card-copy em{
  margin-top:5px;
  color:#607d8b;
  font-size:12px;
  font-style:normal;
}
.live-search-panel{
  position:relative;
  z-index:5;
}
.live-search-form{
  grid-template-columns:minmax(420px, 1fr) auto;
}
.live-search-field{
  position:relative;
}
.live-search-help{
  margin:12px 0 0;
  color:#607d8b;
  font-weight:700;
}
.live-search-status{
  min-height:20px;
  margin-top:8px;
  color:#2a75bb;
  font-size:13px;
  font-weight:800;
}
.live-search-dropdown{
  position:absolute;
  left:0;
  right:0;
  top:100%;
  z-index:20;
  margin-top:8px;
  overflow:hidden;
  border:1px solid #dbe3ea;
  border-radius:8px;
  background:#fff;
  box-shadow:0 16px 40px rgba(23,50,77,.14);
}
.live-search-row{
  display:grid;
  grid-template-columns:42px 1fr;
  gap:10px;
  align-items:center;
  min-height:58px;
  padding:10px 12px;
  border-bottom:1px solid #edf1f5;
}
.live-search-row:last-child{
  border-bottom:0;
}
.live-search-row:hover{
  background:linear-gradient(90deg,rgba(255,203,5,.18),rgba(42,117,187,.08));
}
.live-search-card-copy strong,
.live-search-card-copy span,
.live-search-card-copy small{
  display:block;
}
.live-search-card-copy strong{
  color:#263238;
}
.live-search-card-copy span{
  margin-top:3px;
  color:#2a75bb;
  font-weight:800;
}
.live-search-card-copy small{
  margin-top:2px;
  color:#607d8b;
}
.card-name-lookup{
  position:relative;
  display:grid;
  gap:2px;
  margin-bottom:-8px;
}
.card-name-lookup .live-search-status{
  min-height:14px;
  margin-top:0;
}
.card-meta-row{
  display:flex;
  align-items:start;
  gap:12px;
  flex-wrap:wrap;
}
.card-meta-row label{
  width:auto;
}
.card-set-field input{
  width:8ch;
  max-width:8ch;
  text-transform:uppercase;
}
.card-number-field input{
  width:10ch;
  max-width:10ch;
}
.card-grader-field select{
  width:15ch;
  max-width:15ch;
}
.card-grade-field input{
  width:5ch;
  max-width:5ch;
  min-width:58px;
  text-align:center;
}
.live-search-choice{
  width:100%;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  text-align:left;
  color:inherit;
}
.live-search-choice:hover,
.live-search-choice:focus{
  box-shadow:none;
}
.live-search-choice strong,
.live-search-choice span,
.live-search-choice small{
  display:block;
}
.live-search-choice strong{
  color:#263238;
}
.live-search-choice span{
  margin-top:3px;
  color:#2a75bb;
  font-weight:800;
}
.live-search-choice small{
  margin-top:2px;
  color:#607d8b;
}
.live-search-preview{
  width:42px;
  height:42px;
  padding:0;
  border-radius:8px;
  background:#f5f9fc;
  color:#2a75bb;
  display:flex;
  align-items:center;
  justify-content:center;
}
.live-search-preview:hover,
.live-search-preview:focus{
  background:#ffcb05;
  color:#263238;
}
.camera-icon{
  position:relative;
  display:block;
  width:22px;
  height:15px;
  border:2px solid currentColor;
  border-radius:4px;
}
.camera-icon:before{
  content:"";
  position:absolute;
  left:4px;
  top:-6px;
  width:9px;
  height:5px;
  border:2px solid currentColor;
  border-bottom:0;
  border-radius:3px 3px 0 0;
  background:inherit;
}
.camera-icon:after{
  content:"";
  position:absolute;
  left:6px;
  top:3px;
  width:6px;
  height:6px;
  border:2px solid currentColor;
  border-radius:50%;
}
.live-search-empty{
  padding:14px;
  color:#607d8b;
  font-weight:800;
}
.tcg-preview-popover{
  position:fixed;
  z-index:10001;
  width:230px;
  padding:10px;
  border:1px solid rgba(42,117,187,.2);
  border-radius:8px;
  background:#fff;
  box-shadow:0 18px 50px rgba(23,50,77,.22);
  pointer-events:none;
}
.tcg-preview-popover img{
  display:block;
  width:100%;
  border-radius:8px;
}
.search-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:16px;
}
.search-result-card{
  display:grid;
  gap:12px;
  padding:14px;
  border:1px solid #dbe3ea;
  border-radius:8px;
  background:#fff;
  color:inherit;
  text-decoration:none;
  box-shadow:0 4px 12px rgba(0,0,0,.04);
}
.search-result-card img,
.search-placeholder{
  width:100%;
  aspect-ratio:3/4;
  border-radius:8px;
  object-fit:cover;
  background:#edf1f5;
}
.search-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#607d8b;
  font-size:32px;
  font-weight:900;
}
.search-result-card strong,
.search-result-card span,
.search-result-card small{
  display:block;
}
.search-result-card span{
  margin-top:5px;
  color:#263238;
}
.search-result-card small{
  margin-top:4px;
  color:#607d8b;
}

@media (max-width: 960px){
  .advanced-search-form{
    grid-template-columns:1fr;
  }
  .advanced-fields{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .advanced-search-form .search-wide,
  .grade-range-field,
  .search-actions{
    grid-column:auto;
  }
}

@media (max-width: 620px){
  .advanced-search-form,
  .advanced-search-form .search-wide,
  .advanced-fields{
    grid-template-columns:1fr;
    grid-column:auto;
  }
  .search-actions{
    align-items:flex-start;
    flex-direction:column;
  }
  .live-search-form{
    grid-template-columns:1fr;
  }
  .live-search-actions{
    align-items:flex-start;
    flex-direction:row;
  }
  .tcg-preview-popover{
    left:12px !important;
    right:12px;
    top:auto !important;
    bottom:12px;
    width:auto;
  }
}

.profile-grid{
  display:grid;
  grid-template-columns:300px 1fr;
  gap:18px;
}
.profile-summary{
  text-align:center;
}
.profile-avatar{
  width:96px;
  height:96px;
  margin:0 auto 14px;
  border-radius:50%;
  background:#fff4b8;
  color:#2a75bb;
  border:3px solid #2a75bb;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:42px;
  font-weight:900;
}
.profile-avatar-button{
  cursor:pointer;
  padding:0;
}
.profile-avatar img{
  width:100%;
  height:100%;
  border-radius:50%;
  object-fit:cover;
  background:#fff;
}
.avatar-overlay{
  display:none;
  position:fixed;
  inset:0;
  z-index:10000;
  background:rgba(15,23,42,.55);
  padding:24px;
}
.avatar-overlay.open{
  display:flex;
  align-items:center;
  justify-content:center;
}
.avatar-modal{
  width:min(980px,100%);
  max-height:86vh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  background:#fff;
  border-radius:8px;
  box-shadow:0 20px 60px rgba(0,0,0,.2);
}
.avatar-modal-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:18px 20px;
  border-bottom:1px solid #edf1f5;
}
.avatar-modal-header h2{
  margin:0;
}
.avatar-modal-header button{
  font-size:24px;
  line-height:1;
}
.avatar-filter{
  margin:14px 20px;
  width:auto;
}
.avatar-grid{
  overflow:auto;
  padding:0 20px 20px;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(110px,1fr));
  gap:12px;
}
.avatar-choice{
  margin:0;
}
.avatar-choice button{
  width:100%;
  display:grid;
  gap:6px;
  place-items:center;
  border-radius:8px;
  background:#fff;
}
.avatar-choice button:hover{
  border-color:#2a75bb;
}
.avatar-choice img{
  width:86px;
  height:86px;
  object-fit:contain;
}
.avatar-choice span{
  font-size:12px;
  color:#607d8b;
  font-weight:800;
}

/* GradeVault visual refresh */
.gv-premium-header{
  background:rgba(255,255,255,.9) !important;
  border-bottom:1px solid rgba(42,117,187,.16) !important;
  box-shadow:0 10px 28px rgba(23,50,77,.06);
}
.gv-header-title h1{
  color:#607d8b !important;
  font-size:20px !important;
  font-weight:900 !important;
  letter-spacing:.04em;
  text-transform:uppercase;
}
main{
  background:
    radial-gradient(circle at 12% 0%,rgba(255,203,5,.14),transparent 28%),
    radial-gradient(circle at 90% 6%,rgba(42,117,187,.12),transparent 30%);
}
.dashboard-hero{
  position:relative;
  overflow:hidden;
}
.dashboard-hero:after{
  content:"";
  position:absolute;
  right:-44px;
  top:-44px;
  width:160px;
  height:160px;
  border-radius:50%;
  border:18px solid rgba(42,117,187,.08);
}
.dashboard-hero > *{
  position:relative;
  z-index:1;
}
.metric-card strong{
  color:var(--vault-ink);
}
.metric-card-vault strong,
.metric-card-vault span{
  color:#fff !important;
}
.primary-btn{
  background:linear-gradient(135deg,#2a75bb,#62a9ef);
  border-radius:8px;
}
.header-nav a,
.user-box,
button,
input,
select{
  border-radius:8px;
}
.profile-summary h2{
  margin:0 0 6px;
}
.profile-summary p{
  margin:0 0 14px;
  color:#607d8b;
}
.profile-form{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.profile-form label{
  display:grid;
  gap:6px;
  color:#607d8b;
  font-size:12px;
  font-weight:800;
}
.profile-form .profile-wide{
  grid-column:1 / -1;
}
.success-message{
  margin-bottom:14px;
  padding:10px 12px;
  border-radius:8px;
  background:#e8f7ee;
  color:#0f7a3a;
  font-weight:800;
}
.admin-section{
  margin-top:18px;
}
.gv-header-tools .user-menu{
  transform:translateY(5px);
}

/* GradeVault layout width and chat tuning */
.content{
  overflow:visible;
}
.page-header,
.gv-premium-header{
  width:100%;
  z-index:1000;
}
main{
  width:min(100%,1280px);
  margin:0 auto;
}
@media (max-width: 1180px){
  main{
    width:min(100%,1140px);
  }
}
@media (max-width: 980px){
  main{
    width:min(100%,960px);
  }
}
@media (max-width: 620px){
  main{
    width:100%;
    padding-left:14px;
    padding-right:14px;
  }
}
.user-details{
  position:relative;
}
.user-dropdown{
  z-index:10050 !important;
  top:calc(100% + 10px) !important;
  border-radius:8px !important;
}
.user-name-toggle{
  min-width:150px;
}
.user-name-line{
  display:flex;
  align-items:center;
  gap:10px;
}
.user-slab-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:58px;
  padding:4px 8px;
  border-radius:999px;
  color:#263238;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.user-level-label{
  display:block;
  width:max-content;
  padding:0;
  background:transparent !important;
  color:#607d8b;
  font-size:11px;
  font-weight:900;
}
.level-id-0,
.level-admin{
  background:#6f35fc !important;
  color:#fff !important;
}
.notification-link{
  position:relative;
  font-size:20px !important;
}
.notification-link span{
  position:absolute;
  right:-7px;
  top:-7px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  background:#ffcb05;
  color:#263238;
  border:2px solid #fff;
  font-size:10px;
  font-weight:900;
  line-height:14px;
}
.notification-link.has-unread{
  border-color:#ffcb05 !important;
  background:linear-gradient(135deg,rgba(255,203,5,.35),rgba(255,255,255,.95));
  box-shadow:0 0 0 4px rgba(255,203,5,.18),0 8px 18px rgba(42,117,187,.12);
}
.recent-slab-item{
  color:inherit;
  text-decoration:none;
}
.recent-slab-item:hover{
  border-color:rgba(42,117,187,.28);
  transform:translateY(-1px);
}
.grader-row{
  color:inherit;
  text-decoration:none;
}
.grader-row:hover{
  border-color:rgba(42,117,187,.32);
  box-shadow:0 8px 18px rgba(23,50,77,.08);
}
.chat-layout{
  display:grid;
  grid-template-columns:300px 1fr;
  gap:18px;
  align-items:start;
}
.chat-sidebar h2,
.chat-thread h2{
  margin:0 0 14px;
}
.chat-user-list{
  display:grid;
  gap:8px;
}
.chat-user{
  display:grid;
  grid-template-columns:38px 1fr auto;
  gap:10px;
  align-items:center;
  padding:9px;
  border:1px solid #edf1f5;
  border-radius:8px;
  color:inherit;
  text-decoration:none;
}
.chat-user.active,
.chat-user:hover{
  border-color:rgba(42,117,187,.28);
  background:linear-gradient(90deg,rgba(255,203,5,.16),rgba(42,117,187,.07));
}
.chat-user-avatar{
  width:38px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#fff;
  border:1px solid #dbe3ea;
  color:#2a75bb;
  font-weight:900;
  overflow:hidden;
}
.chat-user-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.chat-user strong{
  min-width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#ffcb05;
  color:#263238;
  font-size:12px;
}
.chat-thread{
  min-height:540px;
  display:flex;
  flex-direction:column;
}
.chat-thread-header{
  border-bottom:1px solid #edf1f5;
  margin:-4px 0 14px;
  padding-bottom:12px;
}
.chat-messages{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:14px;
}
.chat-message{
  max-width:74%;
  padding:10px 12px;
  border-radius:8px;
  background:#edf1f5;
}
.chat-message.mine{
  align-self:flex-end;
  background:linear-gradient(135deg,#2a75bb,#62a9ef);
  color:#fff;
}
.chat-message.theirs{
  align-self:flex-start;
}
.chat-message p{
  margin:0;
  white-space:pre-wrap;
}
.chat-message small{
  display:block;
  margin-top:6px;
  color:inherit;
  opacity:.72;
  font-size:11px;
}
.chat-form{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:end;
}
.chat-form textarea{
  width:100%;
  resize:vertical;
  min-height:74px;
  border:1px solid #d1d9e0;
  border-radius:8px;
  padding:10px 12px;
  font:inherit;
}
.chat-sidebar-section + .chat-sidebar-section{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid rgba(42,117,187,.12);
}
.chat-sidebar-section h3{
  margin:0 0 10px;
  color:#2a75bb;
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:0;
}
.chat-user.compact{
  grid-template-columns:38px 1fr;
}
.profile-chip{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-top:9px;
  padding:5px 8px;
  border:1px solid rgba(42,117,187,.18);
  border-radius:999px;
  background:linear-gradient(90deg,rgba(255,203,5,.18),rgba(42,117,187,.08));
  color:#263238;
  font:inherit;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
.profile-chip:hover{
  border-color:rgba(42,117,187,.42);
  box-shadow:0 6px 14px rgba(23,50,77,.08);
}
.profile-chip img,
.profile-chip span{
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#fff;
  color:#2a75bb;
  object-fit:cover;
  font-size:11px;
}
.profile-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(15,23,42,.42);
  z-index:12000;
}
.profile-overlay.open{
  display:flex;
}
.profile-mini-card{
  width:min(100%,380px);
  padding:18px;
  border:1px solid rgba(42,117,187,.18);
  border-radius:8px;
  background:#fff;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
}
.profile-mini-header{
  display:grid;
  grid-template-columns:78px 1fr;
  gap:14px;
  align-items:center;
}
.profile-mini-header h2{
  margin:3px 0 8px;
}
.profile-mini-avatar{
  width:78px;
  height:78px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px solid rgba(255,203,5,.8);
  border-radius:50%;
  background:linear-gradient(135deg,rgba(255,203,5,.28),rgba(42,117,187,.12));
  color:#2a75bb;
  font-size:30px;
  font-weight:900;
  overflow:hidden;
}
.profile-mini-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.profile-mini-info{
  margin:16px 0 0;
  display:grid;
  gap:10px;
}
.profile-mini-info div{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  border-top:1px solid rgba(42,117,187,.12);
}
.profile-mini-info dt{
  color:#607d8b;
  font-weight:800;
}
.profile-mini-info dd{
  margin:0;
  color:#263238;
  font-weight:900;
}
.profile-mini-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:16px;
  flex-wrap:wrap;
}
.profile-mini-action-row{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
}
.profile-mini-action-row-main{
  justify-content:flex-start;
}
.profile-mini-action-row-secondary{
  margin-top:6px;
}
.profile-mini-action-row .primary-btn{
  flex:1;
}
.profile-public-vault-btn{
  width:100%;
}
.profile-mini-note{
  margin-top:10px;
  padding:10px;
  border-radius:8px;
  background:rgba(42,117,187,.07);
  color:#17324d;
  font-weight:700;
  line-height:1.4;
}
.profile-mini-actions .primary-btn{
  flex:1;
  text-align:center;
}
.friend-icon-btn{
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(42,117,187,.28);
  border-radius:8px;
  background:#fff;
  color:#2a75bb;
  font-size:20px;
  font-weight:900;
  text-decoration:none;
  cursor:pointer;
}
.friend-icon-btn:hover,
.friend-icon-btn.added{
  background:#ffcb05;
  border-color:#ffcb05;
  color:#263238;
}
.friend-icon-btn:disabled{
  cursor:default;
  opacity:.75;
}
.collection-filter-panel,
.bulk-actions-panel{
  margin-bottom:18px;
}
.collection-filter-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.collection-filter-actions{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:14px;
}
.bulk-actions-panel{
  display:grid;
  grid-template-columns:1.2fr repeat(7,minmax(110px,1fr)) auto;
  gap:10px;
  align-items:end;
}
.bulk-actions-panel h2,
.bulk-actions-panel p{
  margin:0;
}
.slab-select-check{
  display:flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  margin:0 0 10px;
  border:1px solid rgba(15,23,42,.32);
  border-radius:8px;
  background:rgba(255,255,255,.9);
  box-shadow:0 8px 18px rgba(23,50,77,.08);
  cursor:pointer;
}
.slab-select-check input{
  width:22px !important;
  height:22px !important;
  margin:0;
  accent-color:#2a75bb;
}
.slab-select-check:has(input:checked){
  border-color:#2a75bb;
  background:linear-gradient(135deg,rgba(42,117,187,.14),rgba(255,203,5,.24));
}
.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;
}
.slab-market-line{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}
.slab-market-line span,
.slab-tags{
  display:inline-flex;
  width:max-content;
  max-width:100%;
  padding:5px 8px;
  border-radius:999px;
  background:rgba(42,117,187,.08);
  color:#263238;
  font-size:12px;
  font-weight:800;
}
.slab-tags{
  margin-top:8px;
  background:rgba(255,203,5,.2);
}
.slab-form textarea,
.slab-edit-form textarea,
.wishlist-form textarea,
.deal-form textarea{
  width:100%;
  border:1px solid #d1d9e0;
  border-radius:8px;
  padding:10px 12px;
  font:inherit;
  resize:vertical;
}
.slab-detail-status{
  width:max-content;
  margin:10px 0;
  padding:6px 10px;
  border-radius:999px;
  background:linear-gradient(90deg,rgba(255,203,5,.22),rgba(42,117,187,.12));
  color:#263238;
  font-weight:900;
}
.slab-detail-note{
  margin:10px 0;
  padding:10px 12px;
  border-left:4px solid #ffcb05;
  background:rgba(255,203,5,.12);
  border-radius:8px;
}
.market-estimate-card{
  display:grid;
  gap:3px;
  width:100%;
  margin-top:10px;
  padding:10px 12px;
  border:1px solid rgba(42,117,187,.18);
  border-radius:8px;
  background:linear-gradient(90deg,rgba(255,203,5,.18),rgba(42,117,187,.08));
  color:#17324d;
  text-align:left;
  cursor:pointer;
}
.market-estimate-card strong{
  font-size:20px;
  line-height:1.1;
}
.market-estimate-card span,
.market-estimate-card small{
  font-weight:800;
}
.market-estimate-card.is-empty{
  cursor:default;
  background:rgba(255,255,255,.72);
}
.market-ebay-links{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:6px;
}
.market-ebay-links a{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:5px 8px;
  border-radius:8px;
  background:rgba(42,117,187,.1);
  color:#2a75bb;
  font-size:12px;
  font-weight:900;
  text-decoration:none;
}
.market-trend{
  display:inline-flex;
  margin-left:8px;
  font-style:normal;
  color:#697782;
}
.market-trend.is-up{color:#0c8f60}
.market-trend.is-down{color:#c63737}
.market-basis-panel{
  display:none;
  gap:8px;
  margin-top:8px;
  padding:10px;
  border:1px solid rgba(42,117,187,.14);
  border-radius:8px;
  background:rgba(255,255,255,.86);
}
.market-basis-panel[hidden]{
  display:none !important;
}
.market-basis-panel:not([hidden]){
  display:grid;
}
.market-basis-panel h3,
.market-basis-panel p{
  margin:0;
}
.market-explain-overlay{
  position:fixed;
  inset:0;
  z-index:50000;
  display:none;
  place-items:center;
  padding:18px;
  background:rgba(10,24,38,.42);
}
.market-explain-overlay.open{
  display:grid;
}
.market-explain-modal{
  width:min(560px,100%);
  max-height:min(720px,88vh);
  overflow:auto;
  display:grid;
  gap:10px;
  padding:18px;
  border-radius:8px;
  background:linear-gradient(135deg,#fff,#f2f9ff 62%,#fff8d9);
  box-shadow:0 28px 80px rgba(10,24,38,.28);
}
.market-source-stats{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:12px 0 16px;
}
.market-source-stats span{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:7px 10px;
  border:1px solid rgba(42,117,187,.16);
  border-radius:8px;
  background:linear-gradient(90deg,rgba(255,203,5,.16),rgba(255,255,255,.88),rgba(42,117,187,.10));
  color:#17324d;
  font-size:13px;
  font-weight:900;
}
.market-source-stats strong{
  margin-left:5px;
  color:#2a75bb;
}
.admin-sync-runs{
  margin-top:14px;
}
.admin-sync-runs h3{
  margin:0 0 10px;
  color:#17324d;
}
.sync-status{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  background:rgba(96,125,139,.12);
  color:#17324d;
}
.sync-status.is-ok{
  background:rgba(0,150,136,.12);
  color:#00796B;
}
.sync-status.is-error{
  background:rgba(211,47,47,.11);
  color:#B71C1C;
}
.market-browser-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
.market-browser-hero h2{
  margin:4px 0 8px;
  color:#2a75bb;
  font-size:28px;
  line-height:1.12;
}
.market-browser-hero p{
  margin:0;
  color:#607d8b;
}
.market-sales-filter-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-top:14px;
}
.market-browser-filters details{
  display:block;
}
.market-browser-filters summary{
  min-height:46px;
  display:flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  padding:12px 14px;
  border:1px solid rgba(42,117,187,.18);
  border-radius:8px;
  background:linear-gradient(90deg,rgba(255,203,5,.16),rgba(42,117,187,.08));
  color:#17324d;
  font-weight:900;
  cursor:pointer;
}
.market-sales-filter-grid label{
  display:grid;
  gap:6px;
  color:#607d8b;
  font-size:12px;
  font-weight:900;
}
.market-sales-filter-grid label span{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  color:#17324d;
}
.market-filter-actions{
  display:flex;
  align-items:end;
  gap:10px;
}
.market-analysis-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin:18px 0;
}
.market-mini-table{
  display:grid;
  gap:8px;
}
.market-analysis-help{
  margin:0 0 12px;
  color:#607d8b;
  font-size:13px;
  font-weight:800;
}
.market-mini-table div{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:10px;
  align-items:center;
  padding:9px 10px;
  border:1px solid rgba(42,117,187,.14);
  border-radius:8px;
  background:linear-gradient(90deg,rgba(255,203,5,.11),rgba(255,255,255,.88),rgba(42,117,187,.08));
}
.market-mini-table span{
  color:#17324d;
  font-weight:900;
}
.market-mini-table strong{
  color:#2a75bb;
}
.market-mini-table em{
  color:#00796B;
  font-style:normal;
  font-weight:900;
}
.market-sales-table-panel .panel-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.market-sales-table-panel .panel-heading h2,
.market-sales-table-panel .panel-heading p{
  margin:0;
}
.market-pagination{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.market-table-scroll{
  overflow:auto;
  border:1px solid rgba(42,117,187,.12);
  border-radius:8px;
  background:#fff;
}
.table-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.table-heading h2,
.table-heading p{
  margin:0;
}
.pagination-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.market-table-wrap{
  overflow:auto;
  border:1px solid rgba(42,117,187,.12);
  border-radius:8px;
  background:#fff;
}
.market-sales-table{
  min-width:1580px;
  margin-top:0;
  font-size:13px;
}
.market-sources-table{
  min-width:1120px;
}
.market-sales-table th{
  position:sticky;
  top:0;
  z-index:1;
  background:linear-gradient(90deg,#edf7ff,#fff9da);
  color:#17324d;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-size:12px;
}
.market-sort-link{
  color:#17324d;
  text-decoration:none;
  white-space:nowrap;
}
.market-sort-link:hover{
  color:#2a75bb;
}
.market-sales-table td{
  vertical-align:top;
}
.market-sales-table th:nth-child(7),
.market-sales-table td:nth-child(7){
  width:58px;
  min-width:58px;
  max-width:58px;
  text-align:center;
  white-space:nowrap;
}
.market-sales-table th:nth-child(2),
.market-sales-table td:nth-child(2),
.market-sales-table th:nth-child(12),
.market-sales-table td:nth-child(12){
  min-width:220px;
}
.market-card-preview-button{
  width:34px;
  height:34px;
  min-height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border-radius:8px;
  border:1px solid rgba(42,117,187,.2);
  background:linear-gradient(135deg,rgba(255,203,5,.22),rgba(42,117,187,.12));
  font-size:17px;
}
.market-quality-form{
  display:grid;
  grid-template-columns:96px 58px 48px minmax(120px,1fr) auto;
  gap:6px;
  align-items:center;
  min-width:390px;
}
.market-quality-form select,
.market-quality-form input{
  min-height:34px !important;
  height:34px !important;
  padding:6px 8px !important;
  font-size:12px !important;
}
.market-quality-form button{
  min-height:34px;
  padding:6px 9px;
  border-radius:8px;
  font-size:12px;
  font-weight:900;
}
.market-quality-exclude{
  display:flex;
  align-items:center;
  gap:4px;
  color:#607d8b;
  font-size:11px;
  font-weight:900;
}
.market-quality-exclude input{
  width:16px !important;
  height:16px !important;
  min-height:16px !important;
}
.market-card-image-overlay{
  position:fixed;
  inset:0;
  z-index:52000;
  display:none;
  place-items:center;
  padding:18px;
  background:rgba(10,24,38,.48);
}
.market-card-image-overlay.open{
  display:grid;
}
.market-card-image-modal{
  position:relative;
  width:min(360px,calc(100vw - 30px));
  display:grid;
  justify-items:center;
  gap:10px;
  padding:16px;
  border:2px solid rgba(255,203,5,.72);
  border-radius:8px;
  background:linear-gradient(135deg,#fff,#f2f9ff 65%,#fff8d9);
  box-shadow:0 28px 90px rgba(10,24,38,.32);
}
.market-card-image-modal img{
  width:min(280px,78vw);
  max-height:78vh;
  object-fit:contain;
}
.market-card-image-modal strong{
  color:#17324d;
  text-align:center;
}
.market-card-image-close{
  position:absolute;
  right:8px;
  top:8px;
  width:34px;
  height:34px;
  min-height:34px;
  padding:0;
  border-radius:8px;
  font-size:20px;
  line-height:1;
}
.market-trend-chart-panel{
  margin:18px 0;
}
.market-trend-bars{
  min-height:260px;
  display:flex;
  align-items:end;
  gap:10px;
  overflow:auto;
  padding:16px 4px 6px;
}
.market-trend-bar{
  min-width:96px;
  height:230px;
  display:grid;
  grid-template-rows:1fr auto auto auto;
  align-items:end;
  gap:6px;
  color:#17324d;
  text-align:center;
  font-size:12px;
  font-weight:900;
}
.market-trend-bar::before{
  content:"";
  width:100%;
  height:var(--bar-height);
  min-height:10px;
  border-radius:8px 8px 3px 3px;
  background:linear-gradient(180deg,rgba(255,203,5,.86),rgba(42,117,187,.72));
  box-shadow:0 10px 22px rgba(42,117,187,.14);
}
.market-trend-bar strong{
  color:#2a75bb;
}
.market-trend-bar small{
  color:#607d8b;
}
.market-explain-modal h3,
.market-explain-modal p{
  margin:0;
}
.market-basis-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:2px 10px;
  padding:8px 10px;
  border-radius:8px;
  background:rgba(42,117,187,.06);
  color:#17324d;
  text-decoration:none;
}
.market-basis-row small{
  grid-column:1 / -1;
  color:#697782;
}
.market-sale-form{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:12px 0 18px;
}
.market-sale-form .profile-wide{
  grid-column:span 2;
}
.same-card-summary{
  display:grid;
  gap:8px;
  margin-top:16px;
}
.same-card-summary h3{
  margin:0 0 4px;
}
.same-card-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 10px;
  border-radius:8px;
  background:linear-gradient(90deg,rgba(42,117,187,.08),rgba(255,203,5,.12));
}
.card-profile-section{
  margin-bottom:18px;
}
.card-profile-distributions{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.collection-view-list{
  grid-template-columns:1fr !important;
}
.collection-view-list .my-slab-card{
  grid-template-columns:72px minmax(120px,220px) 1fr;
  align-items:start;
}
.collection-view-list .slab-select-check{
  grid-column:1;
  grid-row:1;
}
.collection-view-list .slab-image-wrap{
  grid-column:2;
  grid-row:1 / span 2;
}
.collection-view-list .slab-view,
.collection-view-list .slab-edit-form{
  grid-column:3;
}
.collection-view-list .card-bottom-bar{
  grid-column:3;
}
.collection-view-table{
  grid-template-columns:1fr !important;
  gap:8px !important;
}
.collection-view-table .my-slab-card{
  display:grid;
  grid-template-columns:44px 64px 1.4fr 1fr auto;
  align-items:center;
  gap:12px;
  padding:10px 12px;
}
.collection-view-table .slab-select-check{
  width:34px;
  height:34px;
  margin:0;
}
.collection-view-table .slab-select-check input{
  width:18px !important;
  height:18px !important;
}
.collection-view-table .slab-image-wrap{
  width:58px;
  min-height:72px;
}
.collection-view-table .slab-image-wrap img,
.collection-view-table .slab-card-placeholder{
  height:72px;
}
.collection-view-table .slab-public-badge,
.collection-view-table .market-estimate-card,
.collection-view-table .slab-tags{
  display:none;
}
.collection-view-table .slab-view{
  display:grid;
  grid-template-columns:minmax(160px,1.4fr) minmax(130px,1fr) auto;
  align-items:center;
  gap:10px;
}
.collection-view-table .slab-view h3,
.collection-view-table .slab-meta,
.collection-view-table .slab-price,
.collection-view-table .slab-market-line{
  margin:0;
}
.collection-view-table .set-chip{
  display:none;
}
.collection-view-table .card-bottom-bar{
  justify-content:end;
  margin:0;
}
.form-actions-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.inline-action-form{
  display:inline-flex;
  margin:0;
}
.market-refresh-admin-form{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:14px 18px;
  margin:14px 0 18px;
}
.admin-market-action-group{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  width:100%;
}
.admin-action-btn{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 14px;
  border:1px solid rgba(42,117,187,.2);
  border-radius:8px;
  background:linear-gradient(135deg,#ffffff,#edf7ff);
  color:#17324d;
  font-size:14px;
  font-weight:900;
  text-decoration:none;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(23,50,77,.07);
}
.admin-action-btn.is-primary{
  border-color:rgba(42,117,187,.34);
  background:linear-gradient(135deg,#2a75bb,#5aa8e8);
  color:#fff;
}
.market-admin-panel .market-refresh-admin-form{
  display:grid !important;
  grid-template-columns:1fr;
  gap:14px !important;
}
.market-admin-panel .admin-market-action-group{
  display:flex;
  flex-wrap:wrap;
  gap:12px !important;
}
.market-admin-panel .admin-action-btn{
  min-width:210px;
}
.collection-feedback{
  margin-bottom:18px;
  color:#17324d;
  font-weight:900;
}
.admin-health-grid{
  display:grid;
  gap:12px;
}
.admin-log-preview{
  max-height:260px;
  overflow:auto;
  margin:10px 0 0;
  padding:12px;
  border:1px solid rgba(42,117,187,.16);
  border-radius:8px;
  background:#102033;
  color:#f5fbff;
  white-space:pre-wrap;
  font-size:12px;
  line-height:1.45;
}
.wishlist-inline-form{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.card-profile-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.card-profile-actions .wishlist-inline-form{
  margin:0;
}
.deal-list,
.wishlist-list{
  display:grid;
  gap:12px;
}
.deal-card{
  display:grid;
  grid-template-columns:76px 1fr auto;
  gap:14px;
  align-items:center;
}
.deal-card img{
  width:76px;
  aspect-ratio:3/4;
  object-fit:cover;
  border-radius:8px;
}
.deal-card h3,
.deal-card p{
  margin:0 0 6px;
}
.deal-status-form{
  display:grid;
  gap:8px;
}
.wishlist-form{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  align-items:end;
}
.wishlist-lookup{
  grid-column:1 / -1;
}
.wishlist-notes-field{
  grid-column:1 / -1;
}
.wishlist-lists-panel{
  margin-bottom:18px;
}
.wishlist-list-manager{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:14px;
}
.wishlist-list-pill{
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border:1px solid rgba(42,117,187,.18);
  border-radius:8px;
  background:#fff;
}
.wishlist-list-pill.is-default{
  background:linear-gradient(90deg,rgba(255,203,5,.2),rgba(42,117,187,.08));
  border-color:rgba(42,117,187,.3);
}
.wishlist-list-pill span{
  color:#2a75bb;
  font-size:12px;
  font-weight:900;
}
.wishlist-list-pill button{
  padding:6px 8px;
  font-size:12px;
}
.wishlist-new-list-form{
  display:grid;
  grid-template-columns:minmax(180px,1fr) auto;
  gap:10px;
  align-items:end;
}
.wishlist-group + .wishlist-group{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid rgba(42,117,187,.12);
}
.wishlist-group h3{
  margin:0 0 10px;
}
.inline-wishlist-form{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:8px;
}
.inline-wishlist-form .wishlist-action{
  font:inherit;
  cursor:pointer;
}
.inline-wishlist-form .wishlist-action.added,
.inline-wishlist-form .wishlist-action:disabled{
  opacity:.78;
  cursor:default;
}
.wishlist-card{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:12px;
  align-items:center;
  padding:12px;
  border:1px solid rgba(42,117,187,.14);
  border-radius:8px;
  background:#fff;
}
.wishlist-card strong,
.wishlist-card span,
.wishlist-card small{
  display:block;
}
.qr-scan-box{
  display:grid;
  gap:8px;
  align-content:start;
}
.qr-scan-box video{
  width:100%;
  max-width:360px;
  border-radius:8px;
  border:2px solid rgba(42,117,187,.22);
  background:#111;
}
@media (max-width: 760px){
  .chat-layout{
    grid-template-columns:1fr;
  }
  .collection-filter-grid,
  .bulk-actions-panel,
  .card-profile-distributions,
  .market-sale-form,
  .wishlist-form,
  .wishlist-new-list-form,
  .deal-card,
  .wishlist-card{
    grid-template-columns:1fr;
  }
  .collection-view-list .my-slab-card,
  .collection-view-table .my-slab-card,
  .collection-view-table .slab-view{
    grid-template-columns:1fr;
  }
  .collection-view-list .slab-select-check,
  .collection-view-list .slab-image-wrap,
  .collection-view-list .slab-view,
  .collection-view-list .card-bottom-bar{
    grid-column:auto;
    grid-row:auto;
  }
  .collection-view-table .slab-public-badge,
  .collection-view-table .market-estimate-card,
  .collection-view-table .slab-tags,
  .collection-view-table .set-chip{
    display:grid;
  }
  .collection-view-table .slab-image-wrap{
    width:100%;
  }
  .market-sale-form .profile-wide{
    grid-column:auto;
  }
  .chat-message{
    max-width:88%;
  }
  .chat-form{
    grid-template-columns:1fr;
  }
  .card-profile-actions{
    justify-content:flex-start;
  }
}

@media (max-width: 820px){
  .profile-grid{
    grid-template-columns:1fr;
  }
}

/* Global form control alignment: keep every select as tall as text inputs. */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select{
  box-sizing:border-box;
  height:42px !important;
  min-height:42px !important;
  padding-top:10px !important;
  padding-bottom:10px !important;
  line-height:20px !important;
  position:relative;
  top:0 !important;
  vertical-align:top;
}
select{
  appearance:auto;
  -webkit-appearance:menulist;
}
textarea{
  box-sizing:border-box;
}

/* Refacing: softer Pokemon palette, less flat white. */
body{
  background:
    radial-gradient(circle at 8% 0%, rgba(255,203,5,.20), transparent 28%),
    radial-gradient(circle at 92% 6%, rgba(42,117,187,.18), transparent 30%),
    linear-gradient(135deg,#eef7fb 0%,#f8fbff 44%,#fff9dc 100%) !important;
}
.page-header,
.gv-premium-header{
  background:linear-gradient(90deg,rgba(255,255,255,.94),rgba(237,247,255,.92) 58%,rgba(255,248,212,.88)) !important;
  border-bottom:1px solid rgba(42,117,187,.14) !important;
  box-shadow:0 10px 28px rgba(23,50,77,.08);
}
main{
  background:linear-gradient(180deg,rgba(255,255,255,.24),rgba(255,255,255,0));
}
.panel,
.metric-card,
.my-slab-card,
.search-result-card,
.wishlist-card,
.chat-user,
.deal-card{
  border-color:rgba(42,117,187,.16) !important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.96),rgba(250,253,255,.9)),
    linear-gradient(90deg,rgba(255,203,5,.08),rgba(42,117,187,.06)) !important;
  box-shadow:0 14px 36px rgba(23,50,77,.08) !important;
}
.panel{
  position:relative;
  overflow:visible;
}
.panel::before,
.my-slab-card::before,
.search-result-card::before,
.wishlist-card::before,
.deal-card::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:4px;
  border-radius:8px 8px 0 0;
  background:linear-gradient(90deg,rgba(255,203,5,.82),rgba(42,117,187,.7));
  pointer-events:none;
}
.my-slab-card,
.search-result-card,
.wishlist-card,
.deal-card{
  position:relative;
  overflow:hidden;
}
.dashboard-hero{
  background:
    linear-gradient(135deg,rgba(42,117,187,.16),rgba(255,255,255,.88) 48%,rgba(255,203,5,.20)) !important;
  border:1px solid rgba(42,117,187,.14);
  box-shadow:0 18px 44px rgba(23,50,77,.09);
}
.dashboard-hero h2,
.panel h2,
.panel h3,
.chat-sidebar h2,
.chat-thread h2{
  color:#17324d;
}
.eyebrow,
.panel-heading a,
.secondary-action{
  color:#2a75bb !important;
}
.primary-btn,
button.primary-btn{
  border:0 !important;
  background:linear-gradient(135deg,#2a75bb,#62a9ef) !important;
  color:#fff !important;
  box-shadow:0 10px 22px rgba(42,117,187,.18);
}
button:not(.primary-btn):hover,
.secondary-action:hover,
.cert-link:hover{
  border-color:rgba(42,117,187,.28);
  background:linear-gradient(90deg,rgba(255,203,5,.18),rgba(42,117,187,.08));
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea{
  border-color:rgba(42,117,187,.18) !important;
  background:rgba(255,255,255,.94) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
input:focus,
select:focus,
textarea:focus{
  outline:2px solid rgba(255,203,5,.55);
  border-color:rgba(42,117,187,.5) !important;
}
.collection-toolbar,
.collection-filter-panel,
.bulk-actions-panel,
.wishlist-lists-panel,
.chat-sidebar,
.people-deals-panel{
  background:
    linear-gradient(135deg,rgba(255,255,255,.96),rgba(237,247,255,.9) 60%,rgba(255,250,226,.9)) !important;
}
.metric-card-vault{
  background:linear-gradient(90deg,#2a75bb,#72b7f5) !important;
}
.metric-card-public{
  background:linear-gradient(90deg,rgba(255,203,5,.92),rgba(255,244,185,.96)) !important;
}
.metric-card-value{
  background:linear-gradient(90deg,rgba(42,117,187,.16),rgba(255,255,255,.94) 58%,rgba(255,203,5,.18)) !important;
}
.metric-card-popular{
  background:linear-gradient(90deg,rgba(42,117,187,.88),rgba(126,190,246,.88)) !important;
}
.slab-public-badge.is-public,
.slab-market-line span,
.slab-tags,
.user-slab-pill,
.profile-chip{
  box-shadow:0 8px 18px rgba(23,50,77,.08);
}
.people-main{
  display:grid;
  gap:18px;
}
.people-deals-panel{
  min-height:0;
}
.compact-deal-form{
  display:grid;
  gap:10px;
  margin-bottom:16px;
  padding:12px;
  border:1px solid rgba(42,117,187,.14);
  border-radius:8px;
  background:rgba(255,255,255,.64);
}
.compact-deal-list .deal-card{
  grid-template-columns:64px 1fr auto;
  padding:12px;
}
.compact-deal-list .deal-card img{
  width:64px;
}
.site-footer{
  background:linear-gradient(90deg,rgba(237,247,255,.9),rgba(255,249,220,.75)) !important;
  border-top:1px solid rgba(42,117,187,.12) !important;
}
@media (max-width: 900px){
  .chat-layout{
    grid-template-columns:1fr;
  }
  .market-sales-filter-grid,
  .market-analysis-grid{
    grid-template-columns:1fr;
  }
  .market-browser-hero,
  .market-sales-table-panel .panel-heading,
  .table-heading{
    align-items:flex-start;
    flex-direction:column;
  }
  .market-quality-form{
    grid-template-columns:1fr 72px 56px;
    min-width:0;
  }
  .market-quality-form input[name="review_note"]{
    grid-column:1 / -1;
  }
  .compact-deal-list .deal-card{
    grid-template-columns:1fr;
  }
}

.sprite-preview-page{
  display:grid;
  gap:18px;
}
.sprite-preview-section .panel-heading p{
  margin:6px 0 0;
  color:#607d8b;
}
.sprite-preview-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(132px,1fr));
  gap:12px;
}
.sprite-preview-card{
  display:grid;
  gap:8px;
  justify-items:center;
  min-height:174px;
  padding:12px;
  border:1px solid rgba(42,117,187,.14);
  border-radius:8px;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(237,247,255,.84));
  text-align:center;
}
.sprite-preview-image{
  width:104px;
  height:104px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.sprite-preview-image img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}
.sprite-preview-card strong{
  color:#17324d;
  font-size:13px;
}
.sprite-preview-card small{
  color:#607d8b;
  font-size:11px;
  word-break:break-word;
}
.set-chip,
.wishlist-set-line,
.card-set-heading,
.slab-set-brand{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.set-chip{
  width:max-content;
  max-width:100%;
  margin-top:7px;
  padding:5px 8px;
  border-radius:999px;
  background:linear-gradient(90deg,rgba(255,203,5,.2),rgba(42,117,187,.08));
  color:#263238 !important;
  font-size:12px;
  font-weight:900;
}
.set-chip img,
.wishlist-set-line img,
.card-set-heading img,
.slab-set-brand .set-symbol{
  width:22px;
  height:22px;
  object-fit:contain;
}
.slab-set-brand{
  flex-wrap:wrap;
  margin:6px 0 10px;
  color:#607d8b;
  font-weight:900;
}
.slab-set-brand .set-logo{
  max-width:130px;
  max-height:42px;
  object-fit:contain;
}
.card-set-heading{
  flex-wrap:wrap;
}
.card-set-heading img:first-child{
  max-width:150px;
  max-height:44px;
  width:auto;
  height:auto;
  object-fit:contain;
}
.new-slab-switch-row{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}
.mini-switch-form{
  width:auto !important;
  display:inline-flex !important;
  align-items:center;
  gap:8px;
  color:#607d8b;
  font-size:12px;
  font-weight:900;
}
.ios-switch-wrap.small-switch{
  width:42px !important;
  height:24px !important;
}
.ios-switch-wrap.small-switch .ios-switch-slider:before{
  width:18px !important;
  height:18px !important;
  left:3px !important;
  top:3px !important;
}
.ios-switch-wrap.small-switch .ios-switch-input:checked + .ios-switch-slider:before{
  transform:translateX(18px) !important;
}

@media (max-width: 560px){
  .profile-form{
    grid-template-columns:1fr;
  }
}

/* Mobile readability pass: bring GradeVault closer to the denser, clearer scale of marketplace UIs. */
@media (max-width: 760px){
  body{
    font-size:17px;
    line-height:1.45;
    -webkit-text-size-adjust:100%;
  }
  main{
    padding:16px 12px !important;
  }
  .page-header{
    padding:16px 14px !important;
  }
  .page-header h1{
    font-size:18px !important;
    line-height:1.2;
  }
  .header-brand,
  .logo{
    font-size:34px !important;
  }
  .panel,
  .collection-toolbar,
  .collection-filter-panel,
  .bulk-actions-panel,
  .wishlist-lists-panel,
  .people-deals-panel,
  .chat-sidebar,
  .chat-main,
  .card-profile-hero,
  .card-profile-panel{
    padding:16px !important;
  }
  .dashboard-hero{
    padding:18px 16px !important;
    gap:14px;
  }
  .dashboard-hero h2{
    font-size:26px !important;
    line-height:1.16;
  }
  .dashboard-hero p,
  .panel-heading p,
  .slab-meta,
  .slab-detail-cert,
  .profile-muted,
  .wishlist-card p,
  .deal-card p{
    font-size:15px !important;
    line-height:1.45;
  }
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,
  textarea{
    min-height:48px !important;
    height:48px !important;
    padding:12px 13px !important;
    font-size:16px !important;
    line-height:22px !important;
    border-radius:8px !important;
  }
  textarea{
    height:auto !important;
    min-height:112px !important;
  }
  button,
  .primary-btn,
  .secondary-action,
  .dashboard-link,
  .cert-link,
  .icon-action,
  .profile-menu a{
    min-height:46px;
    padding:12px 14px;
    font-size:15px !important;
    line-height:1.2;
    border-radius:8px !important;
  }
  .language-form select{
    min-height:44px !important;
    height:44px !important;
    padding:8px 10px !important;
    font-size:24px !important;
    line-height:24px !important;
  }
  .dashboard-stats,
  .collection-grid,
  .search-results,
  .wishlist-grid,
  .people-grid{
    gap:14px !important;
  }
  .metric-card{
    padding:16px !important;
  }
  .metric-card span{
    font-size:14px !important;
    line-height:1.25;
  }
  .metric-card strong{
    font-size:31px !important;
    line-height:1;
  }
  .metric-card small{
    font-size:14px !important;
  }
  .my-slab-card,
  .search-result-card,
  .wishlist-card,
  .deal-card,
  .person-card,
  .market-sale-card{
    padding:14px !important;
    border-radius:8px !important;
  }
  .my-slab-card h3,
  .search-result-card h3,
  .wishlist-card h3,
  .deal-card h3,
  .person-card h3{
    font-size:18px !important;
    line-height:1.25;
  }
  .slab-public-badge,
  .slab-tags,
  .set-chip,
  .user-slab-pill,
  .profile-chip{
    font-size:13px !important;
    line-height:1.1;
  }
  .slab-overlay{
    padding:10px !important;
  }
  .slab-modal{
    width:min(430px, calc(100vw - 20px)) !important;
    max-width:min(430px, calc(100vw - 20px)) !important;
    padding:16px !important;
    border-radius:18px !important;
  }
  .slab-detail-card,
  .slab-detail-card.vertical{
    padding:18px 16px !important;
    border-radius:18px !important;
  }
  .slab-detail-images .slab-detail-image.vertical,
  .slab-detail-image{
    width:220px !important;
    max-width:78vw !important;
    max-height:43vh !important;
  }
  .slab-flip-frame{
    max-width:78vw !important;
  }
  .slab-detail-content h2,
  .slab-detail-content.vertical h2{
    font-size:20px !important;
    line-height:1.22;
  }
  .slab-detail-grader{
    font-size:24px !important;
  }
  .market-estimate-card,
  .slab-detail-price{
    padding:12px !important;
    font-size:15px !important;
  }
  .collection-view-table table,
  .admin-table,
  table{
    font-size:15px;
  }
  th,
  td{
    padding:11px 10px;
  }
}

@media (max-width: 420px){
  body{
    font-size:16px;
  }
  main{
    padding:12px 10px !important;
  }
  .panel,
  .collection-toolbar,
  .collection-filter-panel,
  .bulk-actions-panel,
  .wishlist-lists-panel,
  .people-deals-panel,
  .chat-sidebar,
  .chat-main,
  .card-profile-hero,
  .card-profile-panel{
    padding:14px !important;
  }
  .dashboard-hero h2{
    font-size:24px !important;
  }
  .metric-card strong{
    font-size:29px !important;
  }
  .my-slab-card h3,
  .search-result-card h3,
  .wishlist-card h3,
  .deal-card h3,
  .person-card h3{
    font-size:17px !important;
  }
.slab-detail-images .slab-detail-image.vertical,
.slab-detail-image{
    width:205px !important;
  }
}

/* Vault tightening pass */
.header-nav .header-vault-link{
  width:auto;
  height:42px;
  min-height:42px;
  padding:0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-color:rgba(42,117,187,.2);
  background:linear-gradient(135deg,#2a75bb,#62a9ef);
  color:#fff;
  font-size:14px;
  font-weight:900;
  line-height:1;
  white-space:nowrap;
}
.header-nav .header-vault-link:hover{
  color:#fff;
  border-color:rgba(42,117,187,.35);
  filter:brightness(1.04);
}
.collection-toolbar{
  justify-content:flex-start !important;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.collection-toolbar .inline-action-form{
  margin:0 0 0 auto;
}
.collection-toolbar .primary-btn,
.collection-toolbar a.primary-btn{
  min-height:42px;
  padding:11px 15px;
  border-radius:8px;
  text-decoration:none;
  font-size:14px;
  font-weight:900;
}
.collection-filter-panel{
  padding:14px !important;
}
.collection-filter-grid{
  grid-template-columns:minmax(260px,1.8fr) minmax(132px,.8fr) minmax(150px,.9fr) minmax(160px,.9fr) minmax(130px,.75fr) !important;
  gap:10px !important;
  align-items:end;
}
.collection-filter-panel h2{
  display:none;
}
.collection-filter-actions{
  justify-content:flex-end;
  gap:10px;
  margin-top:10px !important;
}
.collection-filter-actions .secondary-action{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(42,117,187,.18);
  border-radius:8px;
  text-decoration:none;
}
.bulk-actions-panel{
  display:block !important;
  padding:14px !important;
}
.bulk-actions-panel h2{
  margin:0 0 10px !important;
  color:#17324d;
  font-size:13px !important;
  line-height:1.2;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.bulk-fields{
  display:grid;
  grid-template-columns:170px 150px 170px 74px 120px minmax(130px,1fr) minmax(150px,1fr) auto;
  gap:10px;
  align-items:center;
}
.bulk-fields .primary-btn{
  min-height:42px;
}
.slab-image-wrap{
  width:100%;
  aspect-ratio:2.5 / 3.5;
  min-height:0 !important;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:8px;
  background:linear-gradient(180deg,rgba(237,247,255,.8),rgba(255,249,220,.6));
}
.slab-card-flip-frame{
  position:relative;
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.slab-image-wrap > img,
.slab-card-flip-frame img{
  width:100% !important;
  height:100% !important;
  max-width:100%;
  max-height:100%;
  object-fit:contain !important;
  border-radius:8px !important;
}
.slab-card-placeholder{
  width:100%;
  height:100%;
  min-height:0 !important;
}
.slab-card-flip-btn{
  position:absolute;
  right:8px;
  bottom:8px;
  z-index:2;
  width:32px;
  height:32px;
  min-height:32px;
  padding:0;
  border:2px solid rgba(255,203,5,.94);
  border-radius:999px;
  background:rgba(42,117,187,.92);
  color:#fff;
  font-size:20px;
  font-weight:900;
  line-height:1;
  box-shadow:0 8px 18px rgba(10,24,38,.22);
}
.slab-card-flip-frame.is-back .slab-card-flip-btn,
.slab-card-flip-btn:hover{
  background:#ffcb05;
  color:#17324d;
  border-color:#2a75bb;
}
.recent-slab-item > img,
.recent-slab-item .slab-thumb-placeholder,
.popular-slab-mini img{
  aspect-ratio:2.5 / 3.5;
  object-fit:contain !important;
  background:rgba(255,255,255,.72);
}
.collection-view-list .slab-image-wrap{
  width:160px !important;
  min-height:0 !important;
}
.collection-view-table .slab-image-wrap{
  aspect-ratio:2.5 / 3.5;
  width:58px !important;
  min-height:0 !important;
}
.collection-view-table .slab-image-wrap img,
.collection-view-table .slab-card-placeholder{
  height:100% !important;
}
@media (max-width: 1180px){
  .collection-filter-grid,
  .bulk-fields{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  .bulk-fields .primary-btn{
    justify-self:start;
  }
}
@media (max-width: 760px){
  .header-nav .header-vault-link{
    min-height:44px;
    height:44px;
    padding:0 12px;
    font-size:13px !important;
  }
  .collection-filter-grid,
  .bulk-fields{
    grid-template-columns:1fr !important;
  }
  .collection-filter-actions{
    justify-content:stretch;
  }
  .collection-filter-actions .primary-btn,
  .collection-filter-actions .secondary-action{
    flex:1 1 0;
  }
}

/* Admin tables and account controls */
.page-heading-actions,
.backup-action-bar,
.backup-row-actions,
.backup-confirm-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}
.market-sources-table{
  table-layout:fixed;
  min-width:980px;
}
.market-sources-table th,
.market-sources-table td{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.market-sources-table th:nth-child(1){width:18%;}
.market-sources-table th:nth-child(2){width:14%;}
.market-sources-table th:nth-child(3){width:9%;}
.market-sources-table th:nth-child(4){width:10%;}
.market-sources-table th:nth-child(5){width:9%;}
.market-sources-table th:nth-child(6){width:9%;}
.market-sources-table th:nth-child(7){width:14%;}
.market-sources-table th:nth-child(8){width:17%;}
.source-date-cell{
  font-variant-numeric:tabular-nums;
}
.source-url-cell a{
  display:block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}
.market-sales-table{
  border-collapse:separate;
  border-spacing:0 6px;
}
.market-sales-table th,
.market-sales-table td{
  padding:7px 9px;
  vertical-align:middle;
  line-height:1.25;
}
.market-sales-table tbody tr{
  min-height:unset;
}
.market-sales-table td:nth-child(8),
.market-sales-table th:nth-child(8){
  width:110px;
}
.market-review-cell{
  white-space:nowrap;
}
.market-review-pill{
  min-height:30px;
  padding:5px 10px;
  border:1px solid rgba(42,117,187,.28);
  border-radius:8px;
  background:rgba(42,117,187,.08);
  color:#17324d;
  font-weight:800;
  cursor:pointer;
}
.market-review-modal{
  align-items:stretch;
  justify-items:stretch;
  text-align:left;
}
.market-review-modal h3,
.backup-confirm-modal h3,
.account-delete-modal h3{
  margin:0;
  color:#17324d;
}
.market-review-modal label,
.account-delete-modal label{
  display:grid;
  gap:5px;
  color:#17324d;
  font-weight:800;
}
.market-quality-exclude{
  display:flex !important;
  grid-template-columns:none !important;
  align-items:center;
  gap:8px;
}
.danger-link{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 14px;
  border:1px solid rgba(201,54,54,.28);
  border-radius:8px;
  background:linear-gradient(135deg,#ffe7e7,#fff);
  color:#9c1d1d;
  font-weight:900;
  text-decoration:none;
  cursor:pointer;
}
.backup-confirm-modal{
  text-align:left;
}
.backup-confirm-modal p{
  width:100%;
  overflow-wrap:anywhere;
  margin:0;
  color:#607d8b;
  font-weight:800;
}
.account-security-panel{
  margin-top:18px;
}
.account-actions-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.account-action-card{
  display:grid;
  gap:10px;
  padding:14px;
  border:1px solid rgba(42,117,187,.14);
  border-radius:8px;
  background:linear-gradient(135deg,rgba(255,255,255,.92),rgba(242,249,255,.92));
}
.account-action-card h3,
.account-action-card p{
  margin:0;
}
.account-action-card p{
  color:#607d8b;
  font-weight:700;
}
.profile-otp-box{
  display:grid;
  gap:10px;
  margin:0 0 14px;
  padding:14px;
  border:1px solid rgba(255,203,5,.45);
  border-radius:8px;
  background:linear-gradient(135deg,rgba(255,249,218,.92),rgba(237,247,255,.9));
}
.profile-otp-box h3,
.profile-otp-box p{
  margin:0;
}
.profile-otp-form{
  grid-template-columns:minmax(160px,220px) auto auto;
  align-items:end;
}
@media (max-width:760px){
  .account-actions-grid{
    grid-template-columns:1fr;
  }
  .profile-otp-form{
    grid-template-columns:1fr;
  }
  .market-sales-table th,
  .market-sales-table td{
    padding:6px 7px;
  }
}

/* Vault card tightening and admin user tools */
.user-avatar-toggle{
  padding:0;
  cursor:pointer;
}
.user-avatar-toggle:hover{
  border-color:#ffcb05;
  box-shadow:0 0 0 3px rgba(255,203,5,.22);
}
.collection-grid{
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
}
.collection-grid:not(.collection-view-list):not(.collection-view-table) .my-slab-card{
  display:flex;
  flex-direction:column;
  padding:14px;
  border-radius:14px;
}
.collection-grid:not(.collection-view-list):not(.collection-view-table) .slab-image-wrap{
  margin-bottom:10px;
}
.slab-view{
  display:grid;
  gap:7px;
}
.my-slab-card h3{
  min-height:3.75em;
  margin:0 !important;
  color:#17324d;
  font-size:14px !important;
  line-height:1.25 !important;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
}
.card-bottom-bar{
  margin-top:auto !important;
  padding-top:10px;
  align-items:center;
}
.card-bottom-bar > button,
.card-bottom-bar .delete-wrap > button,
.card-bottom-bar .switch-form{
  min-height:38px;
}
.collection-view-list .my-slab-card{
  display:grid !important;
}
.collection-view-list .my-slab-card h3,
.collection-view-table .my-slab-card h3{
  min-height:0;
}
.wishlist-card{
  grid-template-columns:58px minmax(0,1fr) auto auto !important;
}
.wishlist-card-thumb{
  width:58px;
  aspect-ratio:2.5 / 3.5;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:8px;
  background:linear-gradient(180deg,rgba(237,247,255,.9),rgba(255,249,220,.72));
}
.wishlist-card-thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.wishlist-card-thumb span{
  color:#2a75bb;
  font-size:18px;
  font-weight:900;
}
.wishlist-card strong{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
}
.admin-user-search{
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto auto;
  gap:10px;
  align-items:center;
  margin:0 0 14px;
}
.admin-user-form{
  margin-top:14px;
}
.public-user-hero{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
}
.public-user-avatar{
  width:96px;
  height:96px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border:3px solid rgba(255,203,5,.7);
  background:#fff;
  color:#2a75bb;
  font-size:38px;
  font-weight:900;
}
.public-user-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.public-profile-note{
  margin:10px 0 0;
  color:#17324d;
  font-weight:700;
  line-height:1.45;
}
.public-user-stats{
  display:grid;
  gap:4px;
  justify-items:center;
  padding:12px 16px;
  border-radius:8px;
  background:linear-gradient(135deg,rgba(255,203,5,.18),rgba(42,117,187,.12));
  color:#17324d;
  font-weight:900;
}
.public-user-stats strong{
  font-size:28px;
}
.public-user-slab-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
  gap:14px;
}
.public-user-slab{
  display:grid;
  grid-template-columns:72px minmax(0,1fr);
  gap:12px;
  align-items:center;
  padding:10px;
  border:1px solid rgba(42,117,187,.14);
  border-radius:8px;
  background:linear-gradient(135deg,rgba(255,255,255,.95),rgba(242,249,255,.9));
  cursor:pointer;
}
.public-user-slab img,
.public-user-slab .slab-thumb-placeholder{
  width:72px;
  aspect-ratio:2.5 / 3.5;
  object-fit:contain;
  border-radius:8px;
  background:rgba(255,255,255,.8);
}
.public-user-slab strong{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  color:#17324d;
  font-size:14px;
}
.public-user-slab span,
.public-user-slab small{
  display:block;
  color:#607d8b;
  font-weight:800;
}
@media (max-width:760px){
  .wishlist-card{
    grid-template-columns:52px minmax(0,1fr) !important;
  }
  .wishlist-card > a,
  .wishlist-card > form{
    grid-column:2;
  }
  .admin-user-search{
    grid-template-columns:1fr;
  }
  .public-user-hero{
    grid-template-columns:1fr;
    justify-items:start;
  }
  .public-user-stats{
    justify-items:start;
  }
}

/* Final button normalisation: any CTA-looking link must render as a button. */
a.primary-btn,
a.secondary-action,
a.dashboard-link,
a.cert-link,
a.admin-action-btn,
a.user-box{
  min-height:42px;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 14px !important;
  border-radius:8px !important;
  border:1px solid rgba(42,117,187,.2) !important;
  text-decoration:none !important;
  font-weight:900 !important;
  line-height:1.1;
}
a.secondary-action.profile-public-vault-btn{
  width:100%;
}
a.secondary-action,
a.dashboard-link,
a.cert-link,
a.user-box{
  background:linear-gradient(135deg,#ffffff,#edf7ff) !important;
  color:#17324d !important;
  box-shadow:0 8px 20px rgba(23,50,77,.07);
}
a.primary-btn{
  border-color:rgba(42,117,187,.34) !important;
  background:linear-gradient(135deg,#2a75bb,#62a9ef) !important;
  color:#fff !important;
}

/* Profile overlay action row: keep Chatta + ! X visible in one stable line. */
.profile-mini-action-row-main{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 42px 42px 42px;
  gap:10px;
  align-items:center;
  width:100%;
}
.profile-mini-action-row-main .primary-btn{
  width:100%;
  min-width:0;
}
.profile-mini-action-row-main .friend-icon-btn{
  width:42px !important;
  min-width:42px !important;
  height:42px !important;
  min-height:42px !important;
  padding:0 !important;
  box-sizing:border-box;
}

/* Slab detail overlay compact pass. */
.slab-detail-content.vertical h2{
  max-width:100%;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:18px !important;
  line-height:1.18 !important;
}
.slab-card-profile-link{
  text-decoration:none !important;
  color:#607d8b !important;
  cursor:pointer;
}
.slab-card-profile-link:hover{
  color:#2a75bb !important;
}
.slab-detail-cert a{
  color:inherit;
  text-decoration:none;
}
.slab-detail-cert a:hover{
  color:#2a75bb;
  text-decoration:underline;
}
.slab-flip-frame .slab-flip-btn{
  display:inline-flex !important;
  visibility:visible !important;
  opacity:1 !important;
  z-index:20 !important;
  right:8px !important;
  bottom:8px !important;
}
.slab-owner-actions{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(132px,160px);
  gap:8px;
  align-items:center;
  margin-top:10px;
}
.slab-owner-actions .primary-btn,
.slab-owner-actions .inline-wishlist-form,
.slab-owner-actions select{
  width:100%;
}
.slab-owner-actions .inline-wishlist-form{
  margin:0;
  display:block;
}
.slab-owner-actions select{
  height:42px;
  min-height:42px;
  top:0;
}
.same-card-summary{
  gap:6px !important;
  margin-top:10px !important;
}
.same-card-row{
  min-height:38px;
  padding:7px 10px !important;
  font-size:13px;
}
.same-card-row span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media (max-width:420px){
  .slab-owner-actions{
    grid-template-columns:1fr;
  }
}

.slab-moderation-badge{
  position:absolute;
  left:10px;
  bottom:10px;
  z-index:3;
  padding:5px 8px;
  border-radius:8px;
  background:rgba(255,203,5,.92);
  color:#17324d;
  font-size:11px;
  font-weight:900;
  box-shadow:0 8px 18px rgba(23,50,77,.16);
}
.slab-moderation-badge.status-rejected{
  background:rgba(239,68,68,.92);
  color:#fff;
}
.moderation-user-notice{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-left:4px solid #ffcb05;
}
.moderation-user-notice.is-warning{
  display:block;
  border-left-color:#ef4444;
}
.moderation-user-notice.is-warning .secondary-action{
  margin-top:10px;
}
.image-moderation-list{
  display:grid;
  gap:14px;
}
.image-review-card{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:16px;
  padding:14px;
  border:1px solid rgba(42,117,187,.14);
  border-radius:8px;
  background:linear-gradient(135deg,#ffffff,#f4fbff);
}
.image-review-media{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  align-items:start;
}
.image-review-media img{
  width:100%;
  max-height:260px;
  object-fit:contain;
  border-radius:8px;
  background:#fff;
  border:1px solid rgba(42,117,187,.12);
}
.image-review-body h3{
  margin:0 0 6px;
}
.moderation-score-line{
  display:flex;
  align-items:center;
  gap:10px;
  margin:8px 0;
}
.image-review-actions{
  display:grid;
  grid-template-columns:minmax(180px,1fr) auto auto minmax(150px,auto);
  gap:8px;
  align-items:center;
}
.image-suspend-inline{
  display:flex;
  align-items:center;
  gap:8px;
}
.image-suspend-inline input{
  width:70px;
}
@media (max-width:760px){
  .moderation-user-notice,
  .image-review-card,
  .image-review-actions{
    grid-template-columns:1fr;
  }
  .moderation-user-notice{
    display:grid;
  }
}
