/* catalogue-admin.css — glassy admin UI */
:root{
  --bg0:#070a12;
  --bg1:#0b1020;
  --glass: rgba(255,255,255,.08);
  --glass2: rgba(255,255,255,.12);
  --stroke: rgba(255,255,255,.16);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.66);
  --shadow: 0 12px 30px rgba(0,0,0,.35);
  --radius: 18px;
  --radius2: 22px;
  --max: 1100px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color:var(--text);
  background: radial-gradient(1200px 800px at 20% -10%, rgba(72,120,255,.22), transparent 50%),
              radial-gradient(900px 700px at 90% 10%, rgba(255,88,160,.14), transparent 55%),
              radial-gradient(900px 800px at 50% 120%, rgba(0,255,208,.10), transparent 55%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

.bg{
  position:fixed; inset:0;
  background:
    radial-gradient(800px 500px at 30% 0%, rgba(255,255,255,.06), transparent 60%),
    radial-gradient(900px 700px at 70% 20%, rgba(255,255,255,.04), transparent 60%);
  pointer-events:none;
  opacity:.75;
}

.topbar{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(8,10,18,.78), rgba(8,10,18,.45));
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.topbar-inner{
  max-width:var(--max);
  margin:0 auto;
  padding:14px 14px 8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{display:flex; align-items:center; gap:10px}
.brand-mark{
  width:42px; height:42px;
  border-radius:14px;
  display:grid; place-items:center;
  background: var(--glass);
  border:1px solid var(--stroke);
  box-shadow: var(--shadow);
}
.brand-name{font-weight:750; letter-spacing:.2px; font-size:16px}
.brand-sub{font-size:12px; color:var(--muted); margin-top:2px}

.topbar-actions{display:flex; gap:8px; align-items:center}

.toolbar{
  border-top: 1px solid rgba(255,255,255,.06);
}
.toolbar-inner{
  max-width:var(--max);
  margin:0 auto;
  padding:10px 14px 12px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:end;
}
.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width: 160px;
}
.field.small{min-width: 120px}
.field.grow{flex:1; min-width: 220px}
label{font-size:11px; color: var(--muted); font-weight:650; letter-spacing:.2px}

input, select{
  height:42px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 0 12px;
  outline:none;
}
select{cursor:pointer}
input::placeholder{color: rgba(255,255,255,.4)}

.pillrow{
  display:flex; gap:8px; flex-wrap:wrap;
}
.pill{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 999px;
  padding:8px 12px;
  font-weight:750;
  font-size:12px;
  cursor:pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.pill.on{background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.26)}
.pill.dim{opacity:.55}

.chip{
  border:1px solid var(--stroke);
  background: var(--glass);
  color:var(--text);
  border-radius: 999px;
  padding:9px 12px;
  font-weight:650;
  letter-spacing:.2px;
  cursor:pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.chip.ghost{padding:9px 12px; min-width:44px}
.chip:active{transform: translateY(1px)}
.chip[disabled]{opacity:.5; cursor:not-allowed}

.toggle{
  height:42px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-weight:800;
  cursor:pointer;
}
.toggle.on{background: rgba(0,255,208,.14); border-color: rgba(0,255,208,.22)}
.toggle.off{background: rgba(255,88,160,.12); border-color: rgba(255,88,160,.22)}

.container{
  max-width:var(--max);
  margin:0 auto;
  padding:14px 14px 30px;
}

.split{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}
@media(min-width: 960px){
  .split{grid-template-columns: 0.92fr 1.08fr}
}

.panel{
  border-radius: var(--radius2);
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
  box-shadow: var(--shadow);
  overflow:hidden;
}
.panel-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.10);
}
.panel-title{font-weight:850; letter-spacing:.2px}
.list{padding: 10px; display:flex; flex-direction:column; gap:10px}

.row{
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  padding: 10px 10px;
  display:flex;
  gap:10px;
  align-items:center;
}
.row:hover{background: rgba(255,255,255,.075)}
.row.selected{outline: 2px solid rgba(0,255,208,.18)}

.row-main{flex:1; min-width:0}
.row-title{font-weight:850; font-size:13px}
.row-sub{color: var(--muted); font-size:12px; margin-top:4px; white-space:pre-wrap}

.row-actions{display:flex; gap:6px}
.iconbtn{
  width:40px; height:40px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  cursor:pointer;
  color: var(--text);
  font-weight:900;
}
.iconbtn:active{transform: translateY(1px)}
.iconbtn[disabled]{opacity:.45; cursor:not-allowed}

.toast{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 84px;
  z-index: 80;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.52);
  backdrop-filter: blur(12px);
  padding:10px 14px;
  box-shadow: var(--shadow);
  color: var(--text);
  max-width: calc(var(--max) - 28px);
  text-align:center;
  font-weight:700;
  font-size:12px;
}

.modal{
  position:fixed; inset:0;
  background: rgba(0,0,0,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 90;
  padding: 16px;
}
.modal-card{
  width: min(560px, 100%);
  border-radius: var(--radius2);
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(10,12,20,.92), rgba(10,12,20,.72));
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal-head{
  padding: 12px 12px 10px;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.modal-title{font-weight:850}
.modal-body{padding: 12px; display:flex; flex-direction:column; gap:10px}
.modal-foot{
  padding: 12px;
  display:flex; gap:10px; justify-content:flex-end;
  border-top: 1px solid rgba(255,255,255,.08);
}
.formrow{display:grid; grid-template-columns: 1fr; gap:8px}
@media(min-width:520px){ .formrow.two{grid-template-columns: 1fr 1fr} }
.help{font-size:11px; color: var(--muted)}
hr.sep{border:0; border-top:1px solid rgba(255,255,255,.10); margin:8px 0}


/* Ensure hidden modals are truly hidden (HTML [hidden] can be overridden by display:flex) */
.modal[hidden]{display:none !important;}


/* Locked state (no access / pending) */
body.locked .container{filter: blur(2px); opacity:.45; pointer-events:none;}
body.locked .toolbar{opacity:.55;}


/* --- Theme system --- */

:root{
  --bg:#ffffff;
  --panel:rgba(255,255,255,.75);
  --text:#0f172a;
  --muted:#64748b;
  --stroke:rgba(15,23,42,.12);
  --accent:#16a34a;
  --shadow:0 10px 30px rgba(0,0,0,.08);
  --blur:14px;
}
html[data-theme="dark"]{
  --bg:#0b1020;
  --panel:rgba(15,23,42,.65);
  --text:#e5e7eb;
  --muted:#94a3b8;
  --stroke:rgba(148,163,184,.18);
  --accent:#22c55e;
  --shadow:0 10px 30px rgba(0,0,0,.45);
}
body{
  background:var(--bg);
  color:var(--text);
}
.card, .panel, .item, .modal, .toolbar{
  background:var(--panel);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
  border:1px solid var(--stroke);
}
.muted{color:var(--muted);}
.theme-toggle{
  position:fixed;
  top:14px;
  right:14px;
  z-index:999;
  border-radius:999px;
  padding:8px 10px;
  border:1px solid var(--stroke);
  background:var(--panel);
  cursor:pointer;
}


/* Material icons */

.material-symbols-rounded{
  font-variation-settings: "opsz" 24, "wght" 450, "FILL" 0, "GRAD" 0;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
}



/* Material icon sweep spacing */
.has-icon{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.has-icon .material-symbols-rounded{font-size:20px;}
.has-icon .btn-label{line-height:1;}



/* Icon-only action buttons (borderless Material icons) */
.icon-only{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 8px !important;
  border-radius: 12px;
  min-width: auto !important;
}
.icon-only:hover{
  background: rgba(0,0,0,.06) !important;
}
html[data-theme="dark"] .icon-only:hover{
  background: rgba(255,255,255,.08) !important;
}
.icon-only .material-symbols-rounded{
  font-size: 22px;
}
