:root{
  --ics-red:#E2231A;
  --ink:#111;
  --card:#f4f4f4;
  --shadow:1 0 15px rgba(0,0,0,.1);
  --r:12px;
  --ics-h:110px;
  --ics-w:228px;
  --ics-nudge:-4px;
}

*{
  box-sizing:border-box;
}

body{
  font-family:Arial,Helvetica,sans-serif;
  background:#f4f4f4;
  color:var(--ink);
  padding:28px;
}

.wrap{
  max-width:1000px;
  margin:0 auto;
}

/* header */
header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:16px;
}

.brand{
  display:flex;
  align-items:center;
}

/* Logo */
.badge{
  --ics-nudge: 0px;
  height: var(--ics-h);
  width: calc(var(--ics-h) * 559 / 288);
  background: url("Logo.png") no-repeat left center / auto 100%;
}

.mark{
  display:flex;
  flex-direction:column;
  letter-spacing:.18em;
  text-transform:uppercase;
  font-weight:800;
  color:#333;
  font-size:14px;
  line-height:1.05;
  margin-left:10px;
}

.acct{
  display:none;
  align-items:center;
  gap:8px;
}

.btn{
  padding:8px 12px;
  border:1px solid #ddd;
  border-radius:8px;
  background:#fff;
  cursor:pointer;
}

.btn.small{
  padding:4px 8px;
  font-size:12px;
}

.btn.danger{
  border-color:#d33;
  color:#d33;
}

.btn.primary{
  border-color:#bbb;
}

/* cards & tabs */
.card{
  background:var(--card);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  padding:18px;
}

/* Uniform tabs: same size & shape */
.tabs{
  display:flex;
  gap:0;                          /* no gaps so borders meet cleanly */
  margin-bottom:0;
  border-bottom:1px solid #eee;   /* separator under the tabs */
  flex-wrap:nowrap;               /* keep on one row */
}

.tab{
  flex:1 1 0;                     /* equal widths */
  text-align:center;
  min-height:44px;
  padding:12px 16px;
  background:#f6f6f6;
  border:1px solid #eee;
  border-bottom:none;             /* panel's border shows instead */
  border-top-left-radius:8px;
  border-top-right-radius:8px;
  cursor:pointer;
  font-weight:600;
}

.tab + .tab{
  border-left:none;               /* avoid double divider */
}

.tab[aria-selected="true"]{
  background:#fff;
  position:relative;
  z-index:1;                      /* sit above panel border */
}

.panel{
  display:none;
}

.panel.active{
  display:block;
}

input[type="text"],
input[type="password"],
select,
textarea{
  width:100%;
  padding:10px;
  margin-top:6px;
  border:1px solid #bbb;
  border-radius:8px;
  font-size:14px;
}

textarea{
  min-height:120px;
  resize:vertical;
}

label{
  display:block;
  margin-top:10px;
  font-weight:600;
}

.muted{
  color:#666;
}

.small{
  font-size:12px;
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:8px;
}

#svg-container{
  margin-top:12px;
  border:1px solid #ddd;
  background:#fff;
  min-height:260px;
  padding:10px;
}

.thumb{
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px dashed #ddd;
  border-radius:8px;
  min-height:320px;
  background:#fafafa;
  overflow:hidden;
}

table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border:1px solid #e5e5e5;
}

th,
td{
  padding:8px;
  border-top:1px solid #eee;
  text-align:left;
}

thead th{
  background:#fafafa;
  border-top:none;
}

.alert{
  color:#b00020;
  font-weight:700;
  white-space:pre-line;
  min-height:1.2em;
}

footer{
  margin-top:16px;
  text-align:center;
  color:#555;
  font-size:13px;
}

/*=============================== If labels remain, hide them alongside any legacy selects =============================*/
#codeTypeSingle,
#codeTypeBatch,
label[for="codeTypeSingle"],
label[for="codeTypeBatch"]{
  display:none !important;
}
