:root{
  --bg: #0f3b47;
  --bg2:#0c2f38;
  --panel:#ffffff;
  --muted:#6b7280;
  --text:#0b1220;
  --soft:#eef2f7;
  --line:#e6e9ef;
  --primary:#0e6a78;
  --primary2:#0b5560;
  --danger:#c0392b;
  --success:#1e7d3b;
  --shadow: 0 10px 30px rgba(0,0,0,.18);
  --radius: 16px;
  --radius2: 22px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background-color: var(--bg2);
  background-image:
    radial-gradient(1200px 800px at 30% 10%, rgba(20,83,101,.92) 0%, rgba(15,59,71,.96) 55%, rgba(12,47,56,0) 100%),
    linear-gradient(180deg, #0f3b47 0%, #0d3640 100%);
  background-repeat:no-repeat;
  background-size:cover, cover;
  background-attachment:fixed;
  color:var(--text);
}

.hidden{ display:none !important; }
.center{ text-align:center; }
.muted{ color:var(--muted); }
.w100{ width:100%; }

/* LOGIN */
.login-shell{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
}
.login-card{
  width:min(760px, 92vw);
  background:var(--panel);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding:22px;
}
.login-brand{
  display:flex;
  gap:16px;
  align-items:center;
  padding-bottom:10px;
  border-bottom:1px solid var(--line);
}
.logo{
  width:64px; height:64px;
  border-radius:18px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, var(--primary) 0%, #1aa1b5 100%);
  color:#fff;
  font-weight:800;
  letter-spacing:.5px;
}
.login-card h1{ margin:0; font-size:22px; }
.login-card p{ margin:4px 0 0; color:var(--muted); }

.form{
  margin-top:16px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
.field{ display:flex; flex-direction:column; gap:6px; }
label{ font-size:13px; color:#374151; }

input{
  border:1px solid var(--line);
  border-radius: 12px;
  padding:12px 12px;
  outline:none;
  font-size:14px;
  background:#fff;
}
input:focus{
  border-color: rgba(14,106,120,.55);
  box-shadow: 0 0 0 4px rgba(14,106,120,.14);
}

.actions{
  grid-column:1 / -1;
  display:flex;
  gap:10px;
  justify-content:flex-start;
  align-items:center;
}
.hint{
  grid-column:1 / -1;
  min-height:18px;
  font-size:13px;
  margin-top:2px;
}
.api-note{
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  background: var(--soft);
  color:#374151;
  font-size:13px;
}
code{
  background:rgba(0,0,0,.06);
  padding:2px 6px;
  border-radius:8px;
}

/* BUTTONS */
.btn{
  border:1px solid var(--line);
  background:#fff;
  color:#111827;
  border-radius: 12px;
  padding:10px 14px;
  font-weight:600;
  cursor:pointer;
}
.btn:hover{ background:#f7f9fc; }
.btn:disabled{
  opacity:.6;
  cursor:not-allowed;
}
.btn.primary{
  border-color: transparent;
  background: var(--primary);
  color:#fff;
}
.btn.primary:hover{ background: var(--primary2); }
.btn.danger{
  border-color: transparent;
  background: var(--danger);
  color:#fff;
}
.btn.success{
  border-color: transparent;
  background: var(--success);
  color:#fff;
}

/* APP LAYOUT */
.app-shell{
  min-height:100vh;
  padding:14px;
  display:grid;
  grid-template-columns: 280px 1fr;
  gap:14px;
}

/* SIDEBAR */
.sidebar{
  border-radius: var(--radius2);
  background: rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  padding:14px;
  display:flex;
  flex-direction:column;
}
.sidebar-head{ padding-bottom:10px; border-bottom:1px solid rgba(255,255,255,.12); }
.brand-chip{
  display:flex; align-items:center; gap:12px;
  padding:12px;
  border-radius: 18px;
  background: rgba(255,255,255,.10);
}
.brand-logo{
  width:52px; height:52px; border-radius:16px;
  background: rgba(255,255,255,.12);
  display:grid; place-items:center;
  color:#fff; font-weight:800;
}
.brand-title{ color:#fff; font-weight:800; }
.brand-sub{ color: rgba(255,255,255,.75); font-size:12px; margin-top:2px; }

.nav{ display:flex; flex-direction:column; gap:10px; padding:14px 0; }
.nav-item{
  width:100%;
  border:none;
  border-radius:14px;
  padding:12px 12px;
  background: rgba(255,255,255,.10);
  color:#fff;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  cursor:pointer;
}
.nav-item:hover{ background: rgba(255,255,255,.16); }
.nav-item.active{
  outline: 2px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.18);
}
.nav-ico{ width:26px; text-align:center; }
.badge{
  margin-left:auto;
  padding:4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  color:#fff;
  font-weight:800;
  font-size:12px;
}
.badge.muted{ background: rgba(255,255,255,.10); opacity:.9; }
.pill{
  margin-left:auto;
  padding:4px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.14);
  font-size:12px;
}
.sidebar-foot{
  margin-top:auto;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.12);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.token-row{
  display:flex; align-items:center; justify-content:space-between;
  font-size:12px;
  color: rgba(255,255,255,.75);
}
.token-pill{
  background: rgba(255,255,255,.14);
  padding:4px 8px;
  border-radius:10px;
  color:#fff;
}

/* MAIN */
.main{
  border-radius: var(--radius2);
  background: rgba(0,0,0,.08);
  box-shadow: var(--shadow);
  padding:18px;
}

.topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  margin-bottom:14px;
  color:#fff;
}
.topbar h2{ margin:0; font-size:24px; }
.topbar p{ margin:6px 0 0; color: rgba(255,255,255,.75); }
.topbar-actions{ display:flex; gap:10px; }

/* CONTENT */
.cards{
  display:grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap:14px;
  margin-bottom:14px;
}
.card{
  background:var(--panel);
  border-radius: var(--radius2);
  padding:18px;
  box-shadow: var(--shadow);
}
.card-label{ color:var(--muted); font-size:12px; }
.card-big{ font-size:44px; font-weight:900; margin-top:8px; }
.card-sub{ color:var(--muted); margin-top:6px; }

.panel{
  background:var(--panel);
  border-radius: var(--radius2);
  padding:16px;
  box-shadow: var(--shadow);
}
.panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.panel-title{ font-size:18px; font-weight:900; }
.panel-sub{ color:var(--muted); margin-top:4px; }
.panel-actions{
  display:flex;
  gap:10px;
  align-items:center;
}
.search{
  min-width:260px;
  border:1px solid var(--line);
  border-radius: 12px;
  padding:10px 12px;
}

/* TABLE */
.table-wrap{ margin-top:12px; overflow:auto; }
.table{
  width:100%;
  border-collapse: collapse;
  font-size:13px;
}
.table thead th{
  text-align:left;
  padding:10px;
  border-bottom:1px solid var(--line);
  color:#111827;
  background: #f8fafc;
}
.table tbody td{
  padding:12px 10px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
}
.actions-inline{
  display:flex;
  gap:10px;
  justify-content:flex-start;
}
.note{
  margin-top:10px;
  padding:10px 12px;
  background: #f8fafc;
  border:1px solid var(--line);
  border-radius: 12px;
}

#view-redemptions .panel{
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  padding: 26px 30px;
}

#view-redemptions .note{
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 13px;
  border: 1px solid rgba(14,106,120,.14);
  background: linear-gradient(135deg, rgba(14,106,120,.08), rgba(26,161,181,.05));
  color: #0b5560;
  font-weight: 600;
  font-size: 0.8em;
}

#view-redemptions .panel-head{
  margin-bottom: 14px;
}

#view-redemptions .panel-head h3{
  font-size: 0.8em;
}

#view-redemptions .panel-head .muted{
  font-size: 0.8em;
}

#view-redemptions .panel-actions{
  gap: 10px;
}

#view-redemptions .panel-actions .btn{
  padding: 10px 14px;
  font-size: 0.8em;
}

#redeemTable{
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#view-redemptions .table-wrap{
  overflow: hidden;
}

#redeemTable thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6fb 100%);
  font-size: 10px;
  letter-spacing: .02em;
  padding: 8px 11px 8px 8px;
  white-space: nowrap;
}

#redeemTable tbody tr:hover{
  background: #f8fbff;
}

#redeemTable tbody td{
  line-height: 1.4;
  word-break: break-word;
  padding: 7px 11px 7px 8px;
  font-size: 10px;
}

#redeemTable thead th:nth-child(1),
#redeemTable tbody td:nth-child(1){
  width: 23%;
}

#redeemTable thead th:nth-child(2),
#redeemTable tbody td:nth-child(2){
  width: 8%;
}

#redeemTable thead th:nth-child(3),
#redeemTable tbody td:nth-child(3){
  width: 11%;
}

#redeemTable thead th:nth-child(4),
#redeemTable tbody td:nth-child(4){
  width: 13%;
}

#redeemTable thead th:nth-child(5),
#redeemTable tbody td:nth-child(5){
  width: 10%;
}

#redeemTable thead th:nth-child(6),
#redeemTable tbody td:nth-child(6){
  width: 11%;
}

#redeemTable thead th:nth-child(7),
#redeemTable tbody td:nth-child(7){
  width: 24%;
}

#redeemTable tbody td:nth-child(2),
#redeemTable tbody td:nth-child(5),
#redeemTable tbody td:nth-child(6){
  white-space: nowrap;
}

#redeemTable .pill{
  margin-left: 0;
  background: rgba(14,106,120,.10);
  color: var(--primary2);
  border: 1px solid rgba(14,106,120,.12);
  font-weight: 700;
  font-size: 0.8em;
  padding: 7px 12px;
}

#redeemTable .actions-inline{
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
}

#redeemTable .btn.sm{
  min-width: 72px;
  width: auto;
  padding: 6px 7px;
  font-size: 9px;
  line-height: 1.1;
  white-space: nowrap;
}

.redeem-detail-row td{
  padding: 0 !important;
  background: #f7fbff;
}

.redemption-inline-card{
  margin: 8px 0 12px;
  padding: 14px 16px;
  border: 1px solid rgba(14,106,120,.14);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.redemption-inline-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}

.redemption-inline-head h4{
  margin:4px 0 4px;
  font-size:16px;
}

.redemption-inline-card.compact{
  margin: 6px 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
}

.redemption-inline-card.compact .redemption-inline-head{
  margin-bottom: 8px;
}

.redemption-inline-card.compact .redemption-inline-head h4{
  font-size: 14px;
  margin: 2px 0;
}

.redemption-inline-card.compact .muted{
  font-size: 11px;
}

.redemption-inline-stats,
.redemption-detail-grid,
.redemption-complete-mini-grid,
.redemption-receipt-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:10px;
}

.redemption-inline-stats{
  margin-bottom:12px;
}

.redemption-inline-stats.compact{
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.redemption-inline-stat,
.redemption-detail-item,
.redemption-receipt-item{
  border:1px solid rgba(14,106,120,.10);
  border-radius:14px;
  padding:10px 12px;
  background:#fbfdff;
}

.redemption-inline-stat .k,
.redemption-detail-item .k,
.redemption-receipt-item .k{
  display:block;
  margin-bottom:6px;
  color:#66808f;
  font-size:10px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.redemption-inline-stat strong,
.redemption-detail-item .v,
.redemption-receipt-item .v{
  display:block;
  color:#102534;
  font-size:13px;
  line-height:1.45;
  font-weight:700;
  word-break:break-word;
}

.redemption-inline-card.compact .redemption-inline-stat,
.redemption-inline-card.compact .redemption-detail-item{
  padding: 8px 10px;
  border-radius: 12px;
}

.redemption-inline-card.compact .redemption-inline-stat .k,
.redemption-inline-card.compact .redemption-detail-item .k{
  margin-bottom: 4px;
  font-size: 9px;
}

.redemption-inline-card.compact .redemption-inline-stat strong,
.redemption-inline-card.compact .redemption-detail-item .v{
  font-size: 12px;
  line-height: 1.35;
}

.redemption-detail-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.redemption-detail-grid.single{
  grid-template-columns: 1fr 1fr;
  margin-top:10px;
}

.redemption-detail-section{
  margin-top:12px;
}

.redemption-detail-title{
  margin-bottom:8px;
  color:#0b5560;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.redemption-actions-cell{
  vertical-align:top;
}

.redemption-status-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
}

.redemption-inline-view-btn{
  min-width: 74px !important;
}

.redemption-actions-cell .btn.sm{
  min-width: 84px !important;
  padding: 6px 8px !important;
  font-size: 10px !important;
}

.redemption-complete-modal-card{
  width:min(1120px, 96vw);
  max-height:92vh;
  overflow:hidden;
  padding:0 !important;
  border-radius:30px;
  border:1px solid rgba(14,106,120,.12);
  background:
    radial-gradient(circle at top right, rgba(61, 212, 211, .16), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f6fbfd 100%);
  box-shadow:0 28px 68px rgba(9, 32, 52, .18);
}

.redemption-receipt-modal-card{
  width:min(1120px, 96vw);
  max-height:88vh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.redemption-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin-bottom:0;
  padding:18px 24px 14px;
  border-bottom:1px solid rgba(14,106,120,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.84) 0%, rgba(244,251,253,.88) 100%);
  position:sticky;
  top:0;
  z-index:2;
  backdrop-filter:blur(12px);
}

.redemption-modal-head h3{
  margin:0 0 6px;
  font-size:17px;
  letter-spacing:-.02em;
  color:#0f2233;
}

.redemption-modal-head .muted{
  max-width:560px;
  font-size:12px;
  line-height:1.42;
  color:#647688;
}

.modal-actions.compact{
  margin-top:0;
}

.redemption-complete-modal-card .redemption-complete-mini-grid,
.redemption-complete-modal-card .redemption-complete-grid,
.redemption-complete-modal-card .modal-actions{
  padding-left:24px;
  padding-right:24px;
}

.redemption-complete-modal-card .redemption-complete-mini-grid{
  padding-top:12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap:10px;
}

.redemption-complete-grid{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap:12px;
  margin-top:6px;
  padding-bottom:10px;
}

.redemption-field{
  display:flex;
  flex-direction:column;
  gap:8px;
  grid-column:span 2;
}

.redemption-field span{
  font-size:11px;
  font-weight:800;
  color:#5e7382;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.redemption-field-wide{
  grid-column: span 3;
}

.redemption-complete-modal-card .redemption-inline-stat{
  min-height:104px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(14,106,120,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(242,248,250,.95) 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}

.redemption-complete-modal-card .redemption-inline-stat .k{
  margin-bottom:6px;
  font-size:9px;
  font-weight:800;
  letter-spacing:.12em;
  color:#6a8190;
}

.redemption-complete-modal-card .redemption-inline-stat strong{
  font-size:14px;
  line-height:1.28;
  color:#102434;
  word-break:break-word;
}

.redemption-complete-modal-card .input{
  min-height:46px;
  border-radius:16px;
  border:1px solid rgba(14,106,120,.12);
  background:linear-gradient(180deg, #ffffff 0%, #f8fcfd 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82);
  padding:0 14px;
  font-size:13px;
  color:#102434;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.redemption-complete-modal-card .input:focus{
  border-color:rgba(14,106,120,.24);
  box-shadow:0 0 0 4px rgba(14,106,120,.10);
  outline:none;
}

.redemption-complete-modal-card select.input{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  cursor:pointer;
  padding-right:42px;
  background-image:
    linear-gradient(180deg, #ffffff 0%, #f8fcfd 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23566f7e' d='M4.47 5.97a.75.75 0 0 1 1.06 0L8 8.44l2.47-2.47a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E");
  background-repeat:no-repeat, no-repeat;
  background-position:0 0, calc(100% - 16px) 50%;
  background-size:auto, 16px 16px;
}

.redemption-complete-modal-card .textarea.input{
  height:84px;
  min-height:84px;
  max-height:84px;
  padding:12px 14px;
  resize:none;
  line-height:1.42;
  overflow:auto;
  scrollbar-width:thin;
}

.redemption-complete-modal-card .modal-actions{
  margin-top:0;
  padding-top:8px;
  padding-bottom:16px;
  border-top:1px solid rgba(14,106,120,.08);
}

.redemption-complete-modal-card .modal-actions .btn{
  min-width:146px;
  min-height:42px;
  border-radius:14px;
  font-size:13px;
  font-weight:800;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

.redemption-complete-modal-card .modal-actions .btn:hover:not(:disabled),
.redemption-complete-modal-card .redemption-modal-head .btn:hover:not(:disabled){
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(15, 42, 58, .12);
}

.redemption-complete-modal-card .redemption-modal-head .btn{
  min-width:132px;
  min-height:42px;
  border-radius:16px;
  background:rgba(255,255,255,.94);
  border:1px solid rgba(15, 36, 64, .10);
  font-weight:800;
}

.redemption-complete-modal-card .modal-actions .btn.primary{
  background:linear-gradient(135deg, #0f6675 0%, #16a1a8 100%);
  border-color:transparent;
  color:#fff;
}

.redemption-complete-modal-card .modal-actions .btn.primary:hover:not(:disabled){
  background:linear-gradient(135deg, #0d5d6b 0%, #169097 100%);
}

.redemption-receipt-body{
  overflow:auto;
  padding:18px 22px 22px;
  background:linear-gradient(180deg, #f8fcfd 0%, #f1f7fa 100%);
}

.redemption-receipt-modal-card .redemption-receipt-sections{
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:18px;
}

.redemption-receipt-modal-card .redemption-receipt-section{
  padding:18px 22px;
}

.redemption-receipt-sheet{
  border:1px solid rgba(14,106,120,.10);
  border-radius:22px;
  background:#fff;
  box-shadow:0 18px 44px rgba(16,37,52,.08);
  overflow:hidden;
  position:relative;
}

.redemption-receipt-watermark{
  position:absolute;
  top:188px;
  left:50%;
  transform:translateX(-50%);
  width:1125px;
  height:338px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1800' height='540' viewBox='0 0 1800 540'%3E%3Ctext x='900' y='362' text-anchor='middle' font-family='Times New Roman, Georgia, serif' font-size='340' font-weight='500' letter-spacing='8' fill='rgba(15,102,117,0.038)'%3EGOAT%3C/text%3E%3C/svg%3E") center/contain no-repeat;
  opacity:.72;
  pointer-events:none;
  user-select:none;
}

.redemption-receipt-sheet-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  padding:22px 24px 18px;
  border-bottom:1px solid rgba(14,106,120,.10);
  background:linear-gradient(135deg, #eef9fc 0%, #e0f2f7 42%, #f8fcfd 100%);
}

.redemption-receipt-eyebrow{
  font-size:11px;
  font-weight:800;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:#0f6675;
  margin-bottom:8px;
}

.redemption-receipt-sheet-head h4{
  margin:0 0 8px;
  font-size:28px;
  letter-spacing:-.02em;
  color:#102434;
}

.redemption-receipt-ref{
  font-size:17px;
  font-weight:800;
  color:#0f6675;
  letter-spacing:.04em;
  word-break:break-word;
}

.redemption-receipt-ribbon{
  display:inline-flex;
  align-items:center;
  margin-top:10px;
  padding:7px 12px;
  border-radius:999px;
  background:linear-gradient(135deg,#eff8fb 0%,#daf0f5 100%);
  border:1px solid #cfe6ec;
  color:#0f6675;
  font-size:10px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.redemption-receipt-status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid #b8d9c2;
  background:#edf8f1;
  color:#16834a;
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  white-space:nowrap;
}

.redemption-receipt-summary{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  padding:18px 24px 0;
}

.redemption-receipt-summary-item{
  border:1px solid rgba(14,106,120,.10);
  border-radius:16px;
  padding:12px 14px;
  background:#fbfdff;
}

.redemption-receipt-summary-item .k{
  display:block;
  margin-bottom:7px;
  color:#68808f;
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.redemption-receipt-summary-item strong{
  display:block;
  color:#102534;
  font-size:16px;
  line-height:1.35;
  word-break:break-word;
}

.redemption-receipt-sections{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  padding:14px 24px 0;
}

.redemption-receipt-section,
.redemption-receipt-note-block{
  border:1px solid rgba(14,106,120,.10);
  border-radius:18px;
  background:#fbfdff;
}

.redemption-receipt-section{
  padding:16px 18px;
}

.redemption-receipt-section-head{
  margin-bottom:12px;
  color:#0f6675;
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.redemption-receipt-kv{
  display:flex;
  flex-direction:column;
}

.redemption-receipt-flex-list{
  display:flex;
  flex-direction:column;
}

.redemption-receipt-flex-row{
  display:flex;
  align-items:flex-start;
  gap:18px;
  padding:10px 0;
  border-top:1px solid #edf3f6;
}

.redemption-receipt-flex-row:first-child{
  border-top:0;
  padding-top:0;
}

.redemption-receipt-flex-row span{
  flex:0 0 152px;
  color:#698190;
  font-size:12px;
  line-height:1.4;
  white-space:nowrap;
}

.redemption-receipt-flex-row strong{
  flex:1 1 auto;
  min-width:0;
  color:#102534;
  font-size:15px;
  line-height:1.5;
  white-space:normal;
  word-break:normal;
  overflow-wrap:break-word;
}

.redemption-receipt-kv-row{
  display:grid;
  grid-template-columns:160px minmax(0, 1fr);
  gap:14px;
  padding:10px 0;
  border-top:1px solid #edf3f6;
}

.redemption-receipt-kv-row:first-child{
  border-top:0;
  padding-top:0;
}

.redemption-receipt-kv-row span{
  color:#698190;
  font-size:12px;
  line-height:1.4;
}

.redemption-receipt-kv-row strong{
  color:#102534;
  font-size:15px;
  line-height:1.45;
  word-break:break-word;
}

.redemption-receipt-modal-card .redemption-receipt-flex-row span{
  flex:unset;
  min-width:0;
  white-space:normal;
}

.redemption-receipt-modal-card .redemption-receipt-flex-row{
  display:grid;
  grid-template-columns:140px minmax(0, 1fr);
  gap:16px;
  align-items:start;
}

.redemption-receipt-modal-card .redemption-receipt-flex-row strong{
  display:block;
  width:100%;
  min-width:0;
  font-size:14px;
  line-height:1.55;
  word-break:normal;
  overflow-wrap:break-word;
}

.redemption-receipt-note-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  padding:14px 24px 0;
}

.receipt-modal-sheet{
  border:1px solid rgba(14,106,120,.10);
  border-radius:22px;
  background:#fff;
  box-shadow:0 18px 44px rgba(16,37,52,.08);
  overflow:hidden;
}

.receipt-modal-sheet-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  padding:22px 24px 18px;
  border-bottom:1px solid rgba(14,106,120,.10);
  background:linear-gradient(135deg, #eef9fc 0%, #e0f2f7 42%, #f8fcfd 100%);
}

.receipt-modal-eyebrow{
  font-size:11px;
  font-weight:800;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:#0f6675;
  margin-bottom:8px;
}

.receipt-modal-sheet-head h4{
  margin:0 0 8px;
  font-size:28px;
  letter-spacing:-.02em;
  color:#102434;
}

.receipt-modal-ref{
  font-size:17px;
  font-weight:800;
  color:#0f6675;
  letter-spacing:.04em;
  word-break:break-word;
}

.receipt-modal-ribbon{
  display:inline-flex;
  align-items:center;
  margin-top:10px;
  padding:7px 12px;
  border-radius:999px;
  background:linear-gradient(135deg,#eff8fb 0%,#daf0f5 100%);
  border:1px solid #cfe6ec;
  color:#0f6675;
  font-size:10px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.receipt-modal-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid #b8d9c2;
  background:#edf8f1;
  color:#16834a;
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  white-space:nowrap;
}

.receipt-modal-summary{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  padding:18px 24px 0;
}

.receipt-modal-summary-item{
  border:1px solid rgba(14,106,120,.10);
  border-radius:16px;
  padding:12px 14px;
  background:#fbfdff;
}

.receipt-modal-summary-item .k{
  display:block;
  margin-bottom:6px;
  color:#6d8391;
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.receipt-modal-summary-item strong{
  display:block;
  color:#102534;
  font-size:16px;
  line-height:1.35;
}

.receipt-modal-sections{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  padding:14px 24px 0;
}

.receipt-modal-section,
.receipt-modal-note{
  border:1px solid rgba(14,106,120,.10);
  border-radius:18px;
  background:#fbfdff;
}

.receipt-modal-section{
  padding:16px 18px;
}

.receipt-modal-section-head{
  margin-bottom:12px;
  color:#0f6675;
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.receipt-modal-table{
  display:flex;
  flex-direction:column;
}

.receipt-modal-table-row{
  display:grid;
  grid-template-columns:150px minmax(0, 1fr);
  gap:16px;
  padding:10px 0;
  border-top:1px solid #edf3f6;
}

.receipt-modal-table-row:first-child{
  border-top:0;
  padding-top:0;
}

.receipt-modal-table-row span{
  color:#698190;
  font-size:12px;
  line-height:1.45;
}

.receipt-modal-table-row strong{
  display:block;
  min-width:0;
  width:100%;
  color:#102534;
  font-size:15px;
  line-height:1.5;
  white-space:normal;
  word-break:normal;
  overflow-wrap:break-word;
}

.receipt-modal-note-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  padding:14px 24px 0;
}

.receipt-modal-note{
  padding:14px 16px;
}

.receipt-modal-note.wide{
  grid-column:1 / -1;
}

.receipt-modal-note p{
  margin:0;
  font-size:14px;
  line-height:1.65;
  color:#163043;
  white-space:pre-wrap;
  word-break:break-word;
}

.receipt-modal-footer{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 220px;
  gap:18px;
  align-items:end;
  padding:18px 24px 20px;
  margin-top:16px;
  border-top:1px solid rgba(14,106,120,.10);
  background:linear-gradient(180deg,#fbfdff 0%,#f6fafc 100%);
}

.receipt-modal-copy p{
  margin:0;
  font-size:12px;
  line-height:1.75;
  color:#536878;
}

.receipt-modal-auth{
  justify-self:end;
  min-width:190px;
  text-align:center;
}

.receipt-modal-auth-stamp{
  width:96px;
  height:96px;
  margin:0 auto 8px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='184' height='184' viewBox='0 0 184 184'%3E%3Ccircle cx='92' cy='92' r='84' fill='white' stroke='%230f2b57' stroke-width='6'/%3E%3Ccircle cx='92' cy='92' r='66' fill='none' stroke='%230f2b57' stroke-width='4'/%3E%3Ctext x='92' y='42' text-anchor='middle' font-family='Arial' font-size='12' font-weight='700' fill='%230f2b57'%3EPAYMENT SUCCESSFUL%3C/text%3E%3Ctext x='92' y='105' text-anchor='middle' font-family='Arial' font-size='42' font-weight='900' fill='%230f2b57'%3EPAID%3C/text%3E%3Cpath d='M63 99l17 17 42-47' fill='none' stroke='%2394dfb1' stroke-width='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ctext x='92' y='151' text-anchor='middle' font-family='Arial' font-size='16' font-weight='700' fill='%230f2b57'%3EGOAT%3C/text%3E%3C/svg%3E") center/contain no-repeat;
}

.receipt-modal-auth-line{
  height:1px;
  background:#b8cbd6;
  margin-bottom:10px;
}

.receipt-modal-auth strong{
  display:block;
  font-size:13px;
  color:#102534;
}

.receipt-modal-auth span{
  display:block;
  margin-top:4px;
  font-size:11px;
  color:#68808f;
}

.redemption-receipt-note-block{
  padding:16px 18px;
}

.redemption-receipt-note-block.wide{
  grid-column:1 / -1;
}

.redemption-receipt-note-block p{
  margin:0;
  color:#163043;
  font-size:14px;
  line-height:1.7;
  white-space:pre-wrap;
  word-break:break-word;
}

.redemption-receipt-auth{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 220px;
  gap:18px;
  align-items:end;
  padding:12px 24px 20px;
  margin-top:8px;
  border-top:1px solid #edf3f6;
  background:linear-gradient(180deg,#fbfdff 0%,#f6fafc 100%);
}

.redemption-receipt-auth-copy p{
  margin:0;
  color:#536878;
  font-size:11px;
  line-height:1.65;
  max-width:620px;
}

.redemption-receipt-auth-sign{
  justify-self:end;
  min-width:190px;
  text-align:center;
}

.redemption-receipt-auth-stamp{
  width:110px;
  height:110px;
  margin:0 auto 8px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='184' height='184' viewBox='0 0 184 184'%3E%3Ccircle cx='92' cy='92' r='84' fill='white' stroke='%230f2b57' stroke-width='6'/%3E%3Ccircle cx='92' cy='92' r='66' fill='none' stroke='%230f2b57' stroke-width='4'/%3E%3Ctext x='92' y='42' text-anchor='middle' font-family='Arial' font-size='12' font-weight='700' fill='%230f2b57'%3EPAYMENT SUCCESSFUL%3C/text%3E%3Ctext x='92' y='105' text-anchor='middle' font-family='Arial' font-size='42' font-weight='900' fill='%230f2b57'%3EPAID%3C/text%3E%3Cpath d='M63 99l17 17 42-47' fill='none' stroke='%2394dfb1' stroke-width='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ctext x='92' y='151' text-anchor='middle' font-family='Arial' font-size='16' font-weight='700' fill='%230f2b57'%3EGOAT%3C/text%3E%3C/svg%3E") center/contain no-repeat;
}

.redemption-receipt-auth-sign .line{
  height:1px;
  background:#b8cbd6;
  margin-bottom:10px;
}

.redemption-receipt-auth-sign strong{
  display:block;
  color:#102534;
  font-size:13px;
}

.redemption-receipt-auth-sign span{
  display:block;
  margin-top:4px;
  color:#68808f;
  font-size:11px;
}

@media (max-width: 1180px){
  .redemption-inline-stats,
  .redemption-detail-grid,
  .redemption-complete-mini-grid,
  .redemption-receipt-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .redemption-complete-grid{
    grid-template-columns: 1fr 1fr;
  }

  .redemption-receipt-summary{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .redemption-receipt-sections,
  .redemption-receipt-note-grid{
    grid-template-columns:1fr;
  }

  .redemption-receipt-auth{
    grid-template-columns:1fr;
  }

  .redemption-receipt-auth-sign{
    justify-self:start;
    min-width:0;
    text-align:left;
  }

  .redemption-receipt-kv-row{
    grid-template-columns:130px minmax(0, 1fr);
  }

  .redemption-inline-stats.compact{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .redemption-complete-modal-card{
    width:min(960px, 95vw);
    max-height:90vh;
    overflow:auto;
  }

  .redemption-complete-modal-card .redemption-complete-mini-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .redemption-receipt-modal-card .redemption-receipt-sections{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .redemption-field{
    grid-column:span 1;
  }

  .redemption-field-wide{
    grid-column:span 1;
  }
}

@media (max-width: 760px){
  .redemption-inline-stats,
  .redemption-detail-grid,
  .redemption-complete-mini-grid,
  .redemption-receipt-grid,
  .redemption-complete-grid,
  .redemption-detail-grid.single{
    grid-template-columns: 1fr;
  }

  .redemption-modal-head{
    flex-direction:column;
  }

  .redemption-inline-stats.compact{
    grid-template-columns: 1fr;
  }

  .redemption-receipt-sheet-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .redemption-receipt-summary{
    grid-template-columns:1fr;
  }

  .redemption-receipt-modal-card .redemption-receipt-sections{
    grid-template-columns:1fr;
  }

  .redemption-receipt-watermark{
    width:630px;
    height:188px;
    top:200px;
  }

  .redemption-receipt-kv-row{
    grid-template-columns:1fr;
    gap:6px;
  }

  .redemption-receipt-body{
    padding:14px;
  }

  .redemption-complete-modal-card .redemption-complete-mini-grid,
  .redemption-complete-modal-card .redemption-complete-grid,
  .redemption-complete-modal-card .modal-actions{
    padding-left:18px;
    padding-right:18px;
  }

  .redemption-modal-head{
    padding:18px 18px 14px;
  }

  .redemption-complete-modal-card{
    overflow:auto;
  }
}

/* =========================
   Admin Fit Fix
   - prevent panel/card overflow
   - make headers/forms wrap cleanly
   - keep tables scrollable inside panel only
   ========================= */
.app-shell{
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
}

.main{
  min-width: 0;
  overflow: hidden;
}

.cards{
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.card,
.panel,
.grid-2 > *,
.loy-grid > *,
.loy-vgrid > *{
  min-width: 0;
}

.panel-head{
  flex-wrap: wrap;
}

.panel-head > div:first-child{
  min-width: 0;
}

.panel-actions{
  flex: 1 1 320px;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel-actions .input,
.panel-actions .search,
.panel-actions input,
.panel-actions select{
  min-width: 0;
  max-width: 100%;
  flex: 1 1 180px;
}

.row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.row > *{
  min-width: 0;
}

.row .input{
  flex: 1 1 180px;
}

.row .btn{
  flex: 0 0 auto;
}

.grid-2{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.loy-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.loy-summary{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-wrap{
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 18px;
}

#pendingTable,
#approvedTable,
#rejectedTable,
#warrantyTable,
#auditTable{
  min-width: 980px;
}

#redeemTable{
  min-width: 1040px;
}

#view-loyalty .loy-vgrid .row .input{
  flex: 1 1 160px;
}

#view-loyalty .panel-actions{
  flex: 0 1 auto;
}

#view-loyalty .loy-summary-card,
#view-loyalty .loy-card{
  min-width: 0;
}

#view-loyalty .loy-card-head{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:14px;
}

#view-loyalty .loy-card-head > div:first-child{
  flex: 1 1 380px;
  min-width: 0;
}

#view-loyalty .loy-card-head > .row{
  flex: 0 1 520px;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 10px;
}

#view-loyalty .loy-inline{
  flex: 1 1 240px;
  min-width: 210px;
  max-width: 300px;
}

#view-loyalty #loyVersionSelect{
  width: 100%;
  height: 42px;
  padding: 8px 12px;
  font-size: 13px;
}

#view-loyalty #loySeedDefaultBtn{
  white-space: nowrap;
  align-self: flex-end;
  min-height: 42px;
  padding: 10px 16px;
  font-size: 13px;
}

#view-loyalty .loy-slab-row{
  grid-template-columns: minmax(150px, 1.05fr) minmax(120px, .8fr) minmax(120px, .8fr) minmax(140px, .9fr) minmax(130px, .58fr);
  gap: 10px;
  align-items: end;
}

#view-loyalty .loy-slab-row > div{
  min-width: 0;
}

#view-loyalty .loy-slab-row .input{
  height: 42px;
  padding: 9px 12px;
  font-size: 13px;
  border-radius: 12px;
}

#view-loyalty .loy-label{
  display:block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
}

#view-loyalty .loy-slab-actions{
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
}

#view-loyalty .loy-slab-actions .chk{
  margin-top: 0;
  font-size: 12px;
  white-space: nowrap;
}

#view-loyalty .loy-slab-actions .btn{
  width: auto;
  min-width: 110px;
  min-height: 42px;
  padding: 10px 16px;
  font-size: 13px;
  border-radius: 14px;
}

#view-loyalty #loyPreviewValue,
#view-loyalty .chk.mt8{
  margin-top: 8px !important;
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 1280px){
  .cards{
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

@media (max-width: 980px){
  .app-shell{
    grid-template-columns: 1fr;
  }

  .grid-2,
  .loy-grid,
  .loy-summary{
    grid-template-columns: 1fr;
  }

  #view-loyalty .loy-card-head > .row{
    justify-content: flex-start;
    flex-basis: 100%;
  }

  #view-loyalty .loy-inline{
    max-width: 100%;
  }

  .panel-actions{
    flex-basis: 100%;
    justify-content: flex-start;
  }

  .panel-actions .input,
  .panel-actions .search,
  .panel-actions input,
  .panel-actions select{
    flex: 1 1 100%;
  }

  #view-loyalty .loy-slab-row{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #view-loyalty .loy-slab-actions .btn{
    width: 100%;
  }
}

/* MODAL */
.modal{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  display:grid;
  place-items:center;
  padding:18px;
  z-index:50;
}

#confirmModal{
  z-index:90;
}

#reviewNoteModal{
  z-index:85;
}

#redemptionCompleteModal{
  z-index:70;
}

.modal-card{
  width:min(560px, 92vw);
  background:var(--panel);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding:18px;
}
.modal-card h3{ margin:0; }
.modal-textarea{
  width:100%;
  margin-top:14px;
}
.modal-actions{
  margin-top:14px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

/* TOAST */
.toast{
  position:fixed;
  right:18px;
  bottom:18px;
  background: #0b1220;
  color:#fff;
  padding:10px 12px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index:60;
}

/* RESPONSIVE */
@media (max-width: 1100px){
  .cards{ grid-template-columns: 1fr; }
  .app-shell{ grid-template-columns: 1fr; }
  .sidebar{ order:2; }
  .main{ order:1; }
  .form{ grid-template-columns: 1fr; }
  .search{ min-width: 180px; }
}


/* ===== Added utilities for new admin sections (safe) ===== */
.mt8{ margin-top:8px; }
.mt12{ margin-top:12px; }
.mt16{ margin-top:16px; }

.nav-sep{ height:1px; background: rgba(255,255,255,.12); margin:10px 10px; border-radius:999px; }

.grid-2{ display:grid; grid-template-columns: 1fr 1fr; gap:14px; }
@media (max-width: 980px){
  .grid-2{ grid-template-columns: 1fr; }
}

.chk{ display:flex; align-items:center; gap:8px; font-size:13px; color: var(--muted); }
.chk input{ width:16px; height:16px; }

/* =========================
   GUPI MANAGEMENT (NEW)
========================= */

.gupi-cards{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.gupi-mini-card{
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  border-radius:14px;
  padding:12px 14px;
  min-width:160px;
  cursor:pointer;
  text-align:left;
  transition:
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    background-color .18s ease;
}
.gupi-mini-card:hover{
  transform:translateY(-2px);
  border-color:rgba(14,106,120,.22);
  box-shadow:0 16px 28px rgba(15, 71, 87, .08);
}
.gupi-mini-card.is-active{
  border-color:rgba(14,106,120,.3);
  background:linear-gradient(180deg, #f7fcfd 0%, #eef8fa 100%);
  box-shadow:0 18px 30px rgba(15, 71, 87, .10);
}
.gupi-mini-card .t{ font-size:13px; opacity:.7; }
.gupi-mini-card .v{ font-size:22px; font-weight:700; margin-top:6px; }

.gupi-manage-area{
  border-top:1px solid rgba(0,0,0,.08);
  padding-top:12px;
}
.gupi-manage-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
}

.gupi-list{ margin-top:10px; display:flex; flex-direction:column; gap:10px; }

.gupi-batch{
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  background:#fff;
  overflow:hidden;
}
.gupi-batch-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  cursor:pointer;
}
.gupi-batch-title{
  font-weight:700;
}
.gupi-batch-meta{
  font-size:12px;
  opacity:.75;
  margin-top:4px;
}
.gupi-batch-actions{
  display:flex;
  gap:8px;
  align-items:center;
}
.gupi-batch-actions .btn{ padding:8px 10px; }

.gupi-batch-body{
  display:none;
  border-top:1px solid rgba(0,0,0,.08);
  padding:12px 14px;
}
.gupi-batch-body.open{ display:block; }

.gupi-codes{
  max-height:260px;
  overflow:auto;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
}
.gupi-code-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid rgba(0,0,0,.06);
  font-size:13px;
}
.gupi-code-row:last-child{ border-bottom:none; }
.gupi-code-row .muted{ opacity:.7; }

.gupi-pager-shell{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  padding-top:10px;
}

.gupi-pager-summary{
  display:flex;
  align-items:center;
  gap:8px;
  color:#40616c;
  font-size:13px;
  font-weight:700;
}

.gupi-pager-summary strong{
  color:#0c3240;
}

.gupi-pager-controls{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex:1 1 auto;
}

.gupi-pager-pages{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.gupi-pager-ellipsis{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  color:#6a7f89;
  font-size:13px;
  font-weight:800;
}

.gupi-pager-btn{
  min-width:40px;
  min-height:38px;
  padding:8px 12px;
  border:1px solid rgba(15,59,71,.10);
  border-radius:11px;
  background:linear-gradient(180deg, #ffffff 0%, #f2f7f9 100%);
  color:#0c3240;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(15,59,71,.08);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.gupi-pager-btn:hover:not(:disabled){
  transform:translateY(-1px);
  border-color:rgba(14,106,120,.24);
  box-shadow:0 12px 24px rgba(15,59,71,.14);
}

.gupi-pager-btn.is-active{
  border-color:transparent;
  color:#fff;
  background:linear-gradient(135deg, #0e6a78 0%, #1491a1 100%);
  box-shadow:0 14px 26px rgba(14,106,120,.22);
}

.gupi-pager-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  box-shadow:none;
}

.gupi-pager-nav{
  min-width:66px;
}

@media (max-width: 1320px){
  .gupi-pager-controls{
    width:100%;
    justify-content:flex-start;
  }

  .gupi-pager-pages{
    justify-content:flex-start;
  }
}

@media (max-width: 760px){
  .gupi-pager-shell{
    align-items:stretch;
  }

  .gupi-pager-summary,
  .gupi-pager-controls{
    width:100%;
  }
}


/* =========================
   BARCODE MANAGEMENT
========================= */

.field-span-2{
  grid-column: span 2;
}

.barcode-mini-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:14px;
}

.barcode-mini-card{
  border:1px solid rgba(15, 118, 110, .12);
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, .08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7fbfd 100%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .05);
}

.barcode-mini-card-action{
  cursor:pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.barcode-mini-card-action:hover,
.barcode-mini-card-action:focus-visible{
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(14,106,120,.10);
  border-color: rgba(14,106,120,.26);
  outline:none;
}

.barcode-top-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.barcode-action-bar{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:stretch;
  gap:14px;
  animation:barcodeDeskToolbarReveal .28s ease;
}

.barcode-action-input-shell{
  min-width:0;
  display:flex;
  align-items:center;
  padding:12px 16px;
  border-radius:22px;
  border:1px solid rgba(14,106,120,.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(243,248,250,.96) 100%),
    radial-gradient(circle at top right, rgba(14,106,120,.08), transparent 46%);
  box-shadow:0 18px 40px rgba(15, 42, 58, .06);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.barcode-action-input-shell:hover{
  transform:translateY(-1px);
  box-shadow:0 22px 42px rgba(14,106,120,.10);
}

.barcode-action-input-shell:focus-within{
  transform:translateY(-1px);
  border-color:rgba(14,106,120,.34);
  box-shadow:0 0 0 4px rgba(14,106,120,.10), 0 22px 42px rgba(14,106,120,.12);
}

.barcode-action-input{
  flex:1 1 auto;
  min-width:0;
  border:none;
  background:transparent;
  padding:6px 2px;
  box-shadow:none;
  font-size:17px;
  font-weight:700;
  color:#112334;
}

.barcode-action-input:focus{
  border:none;
  box-shadow:none;
  outline:none;
}

.barcode-action-input::placeholder{
  color:#748699;
  font-weight:600;
}

.barcode-action-buttons{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:nowrap;
}

.barcode-action-buttons .btn{
  min-height:46px;
  min-width:154px;
  border-radius:16px;
  font-weight:800;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

.barcode-action-buttons .btn:hover:not(:disabled){
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(15, 42, 58, .10);
}

.barcode-action-note{
  color:#557084;
  animation:barcodeDeskToolbarNoteFade .34s ease;
}

.barcode-desk-modal-card{
  width:min(1220px, 96vw);
  max-height:min(90vh, 980px);
  padding:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  border-radius:30px;
  border:1px solid rgba(14,106,120,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(245,250,252,.98) 100%),
    radial-gradient(circle at top right, rgba(14,106,120,.08), transparent 46%);
  box-shadow:0 28px 70px rgba(12, 33, 47, .22);
}

.barcode-desk-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:20px 28px 16px;
  border-bottom:1px solid rgba(14,106,120,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.94) 0%, rgba(244,250,252,.86) 100%);
}

.barcode-desk-head h3{
  margin:0;
  font-size:31px;
  line-height:1.08;
  color:#102233;
}

.barcode-desk-head .muted{
  margin:8px 0 0;
  max-width:760px;
}

.barcode-desk-head-actions{
  margin-top:0;
  display:flex;
  align-items:center;
  gap:10px;
}

.barcode-desk-head-actions .btn{
  min-width:118px;
  min-height:44px;
  border-radius:16px;
  font-weight:800;
}

.barcode-desk-toolbar{
  padding:16px 28px 18px;
  border-bottom:1px solid rgba(14,106,120,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(245,250,252,.92) 100%);
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  position:sticky;
  top:0;
  z-index:4;
  animation:barcodeDeskToolbarReveal .28s ease;
}

.barcode-desk-toolbar:not(.hidden){
  display:flex;
}

.barcode-desk-search-bar{
  flex:1 1 100%;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.barcode-desk-search-shell{
  flex:1 1 520px;
  min-width:280px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 14px;
  border-radius:20px;
  border:1px solid rgba(14,106,120,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(243,248,250,.96) 100%),
    radial-gradient(circle at top right, rgba(14,106,120,.08), transparent 46%);
  box-shadow:0 16px 34px rgba(15, 42, 58, .06);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.barcode-desk-search-shell:hover{
  transform:translateY(-1px);
  box-shadow:0 20px 40px rgba(14,106,120,.10);
}

.barcode-desk-search-shell:focus-within{
  transform:translateY(-1px);
  border-color:rgba(14,106,120,.34);
  box-shadow:0 0 0 4px rgba(14,106,120,.10), 0 22px 42px rgba(14,106,120,.12);
}

.barcode-desk-search-kicker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:70px;
  height:40px;
  padding:0 14px;
  border-radius:999px;
  background:linear-gradient(135deg, #0f6675 0%, #16a1a8 100%);
  color:#fff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
  box-shadow:0 14px 26px rgba(14,106,120,.18);
}

.barcode-desk-toolbar-search{
  flex:1 1 auto;
  min-width:0;
  border:none;
  background:transparent;
  padding:6px 2px;
  box-shadow:none;
  font-size:16px;
  font-weight:700;
  color:#112334;
}

.barcode-desk-toolbar-search:focus{
  box-shadow:none;
  border:none;
  outline:none;
}

.barcode-desk-toolbar-search::placeholder{
  color:#748699;
  font-weight:600;
}

.barcode-desk-toolbar-note{
  margin-left:auto;
  font-size:13px;
  font-weight:700;
  color:#496273;
  animation:barcodeDeskToolbarNoteFade .34s ease;
}

.barcode-desk-toolbar-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.barcode-desk-toolbar-actions .btn{
  min-height:42px;
  border-radius:14px;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

.barcode-desk-toolbar-actions .btn:hover:not(:disabled){
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(15, 42, 58, .10);
}

.barcode-desk-search-btn{
  min-width:120px;
}

.barcode-desk-body{
  flex:1;
  overflow:auto;
  padding:24px 28px 28px;
  background:
    linear-gradient(180deg, rgba(251,253,254,.96) 0%, rgba(240,247,249,.98) 100%),
    radial-gradient(circle at top right, rgba(14,106,120,.07), transparent 42%);
}

.barcode-desk-stack{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.barcode-desk-empty{
  min-height:240px;
  border-radius:24px;
  border:1px dashed rgba(14,106,120,.24);
  background:linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(243,248,250,.94) 100%);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:28px;
  font-size:16px;
  line-height:1.7;
  color:#5e7284;
}

.barcode-desk-record{
  border-radius:24px;
  border:1px solid rgba(14,106,120,.12);
  background:rgba(255,255,255,.95);
  box-shadow:0 16px 38px rgba(15, 42, 58, .06);
  padding:20px 22px;
}

.barcode-desk-record-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
}

.barcode-desk-record-main{
  min-width:0;
  flex:1;
}

.barcode-desk-record-overline{
  font-size:12px;
  font-weight:800;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:#57718a;
}

.barcode-desk-record-title{
  margin:8px 0 0;
  font-size:25px;
  line-height:1.15;
  color:#102233;
}

.barcode-desk-record-meta{
  margin-top:8px;
  color:#55697a;
  line-height:1.6;
}

.barcode-desk-record-event{
  margin-top:12px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(14,106,120,.08);
  color:#0f5963;
  font-size:13px;
  font-weight:800;
}

.barcode-desk-record-badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}

.barcode-desk-record-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(16,34,51,.04);
  color:#23394d;
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.barcode-desk-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.barcode-desk-actions .btn{
  min-height:42px;
  min-width:136px;
  border-radius:14px;
  font-weight:800;
}

.barcode-desk-pager{
  margin-top:18px;
  padding:16px 18px;
  border-radius:20px;
  border:1px solid rgba(14,106,120,.12);
  background:rgba(255,255,255,.9);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.barcode-desk-pager-summary{
  color:#506578;
  font-size:14px;
  line-height:1.6;
}

.barcode-desk-pager-controls{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.barcode-desk-pager .barcode-pager-btn{
  min-width:120px;
  min-height:40px;
  border-radius:14px;
}

.barcode-desk-preview-layout{
  display:grid;
  grid-template-columns:minmax(360px, .9fr) minmax(0, 1.1fr);
  gap:18px;
  align-items:start;
}

.barcode-desk-preview-panel,
.barcode-desk-info-panel,
.barcode-desk-timeline-panel{
  border-radius:24px;
  border:1px solid rgba(14,106,120,.12);
  background:rgba(255,255,255,.95);
  box-shadow:0 16px 38px rgba(15, 42, 58, .06);
  padding:22px;
}

.barcode-desk-preview-shell{
  min-height:340px;
  border-radius:22px;
  border:1px solid rgba(14,106,120,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(244,249,251,.96) 100%),
    radial-gradient(circle at top right, rgba(14,106,120,.06), transparent 42%);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
}

.barcode-desk-info-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.barcode-desk-info-card{
  border-radius:18px;
  background:linear-gradient(180deg, rgba(248,252,253,.98) 0%, rgba(240,247,249,.96) 100%);
  border:1px solid rgba(14,106,120,.10);
  padding:16px 18px;
}

.barcode-desk-info-card span{
  display:block;
  font-size:12px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#5f7890;
}

.barcode-desk-info-card strong{
  display:block;
  margin-top:8px;
  font-size:24px;
  line-height:1.16;
  color:#122335;
}

.barcode-desk-info-card .muted{
  margin-top:8px;
  font-size:13px;
}

.barcode-desk-timeline-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
  margin-top:18px;
}

.barcode-desk-timeline-list{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:14px;
}

.barcode-desk-timeline-item{
  border-radius:18px;
  border:1px solid rgba(14,106,120,.10);
  background:rgba(248,252,253,.95);
  padding:14px 16px;
}

.barcode-desk-timeline-item strong{
  display:block;
  font-size:15px;
  color:#102233;
}

.barcode-desk-timeline-item .muted{
  margin-top:6px;
  line-height:1.55;
}

.barcode-desk-section-title{
  margin:0;
  font-size:24px;
  line-height:1.15;
  color:#102233;
}

.barcode-desk-section-text{
  margin-top:8px;
  color:#607487;
  line-height:1.6;
}

@keyframes barcodeDeskToolbarReveal{
  from{
    opacity:0;
    transform:translateY(-8px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

@keyframes barcodeDeskToolbarNoteFade{
  from{
    opacity:0;
    transform:translateY(4px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

.barcode-main-grid{
  display:grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .95fr);
  gap:16px;
  align-items:start;
}

.barcode-sub-grid{
  display:grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  gap:16px;
  align-items:start;
}

.barcode-form-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:14px;
}

.barcode-form-grid .input,
.barcode-form-grid input,
.barcode-form-grid select{
  width:100%;
}

.barcode-form-grid select.input{
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px 12px;
  outline:none;
  font-size:14px;
  background:#fff;
}

.barcode-form-grid select.input:focus{
  border-color: rgba(14,106,120,.55);
  box-shadow: 0 0 0 4px rgba(14,106,120,.14);
}

.barcode-code-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
}

.barcode-code-chip{
  padding:14px 16px;
  border-radius:16px;
  border:1px solid rgba(14,106,120,.14);
  background: linear-gradient(180deg, rgba(248,251,253,.98) 0%, rgba(237,246,248,.96) 100%);
  display:flex;
  flex-direction:column;
  gap:6px;
}

.barcode-code-chip span{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#597387;
}

.barcode-code-chip strong{
  font-size:20px;
  font-weight:800;
  color:#0f172a;
}

.barcode-code-chip.wide{
  grid-column: span 4;
}

.barcode-preview-stage{
  min-height:420px;
  border-radius:20px;
  border:1px solid rgba(14,106,120,.14);
  background:
    linear-gradient(180deg, rgba(250,252,254,.98) 0%, rgba(237,246,248,.96) 100%),
    radial-gradient(circle at top right, rgba(14,106,120,.10), transparent 46%);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
  overflow:auto;
}

.barcode-preview-empty{
  max-width:360px;
  text-align:center;
  color:#5c7283;
  font-size:15px;
  line-height:1.6;
}

.barcode-svg-shell{
  width:min(100%, 760px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:26px 30px;
  border-radius:28px;
  border:1px solid rgba(15, 23, 42, .06);
  background:#ffffff;
  box-shadow:
    0 24px 54px rgba(15, 23, 42, .10),
    inset 0 1px 0 rgba(255,255,255,.8);
}

.barcode-svg-shell svg{
  width:100%;
  max-width:640px;
  height:auto;
  filter: drop-shadow(0 12px 26px rgba(15, 23, 42, .08));
}

.barcode-preview-meta{
  color:#334155;
  min-height:72px;
}

.barcode-preview-actions{
  flex-wrap:wrap;
}

.barcode-lookup-result,
.barcode-selected-summary{
  min-height:120px;
  border-radius:18px;
  border:1px solid rgba(14,106,120,.12);
  background:#f9fbfc;
  padding:18px;
  color:#334155;
}

.barcode-lookup-result.is-error{
  border-color: rgba(185, 28, 28, .22);
  background:#fff6f6;
  color:#991b1b;
}

.barcode-lookup-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
}

.barcode-lookup-chip{
  padding:12px 14px;
  border-radius:14px;
  background:#fff;
  border:1px solid rgba(148, 163, 184, .18);
  display:flex;
  flex-direction:column;
  gap:6px;
}

.barcode-lookup-chip span{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#64748b;
}

.barcode-lookup-chip strong{
  font-size:14px;
  color:#0f172a;
}

.barcode-selected-title{
  font-size:22px;
  font-weight:800;
  color:#0f172a;
}

.barcode-selected-chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.barcode-selected-chip{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(14,106,120,.08);
  color:#0f5963;
  font-size:13px;
  font-weight:700;
}

.barcode-activity-list{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.barcode-activity-section{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.barcode-activity-heading{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#64748b;
  font-weight:800;
}

.barcode-activity-item,
.barcode-activity-empty{
  border-radius:14px;
  border:1px solid rgba(148, 163, 184, .18);
  background:#fff;
  padding:14px 16px;
}

.barcode-activity-empty{
  color:#64748b;
}

.barcode-registry-head{
  gap:16px;
}

.barcode-registry-search{
  min-width:280px;
}

.barcode-registry-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.barcode-record-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:18px 20px;
  border-radius:18px;
  border:1px solid rgba(148, 163, 184, .18);
  background:#fff;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.barcode-record-item:hover{
  border-color: rgba(14,106,120,.24);
  box-shadow: 0 14px 32px rgba(14,106,120,.08);
  transform: translateY(-1px);
}

.barcode-record-item.is-selected{
  border-color: rgba(14,106,120,.34);
  box-shadow: 0 16px 36px rgba(14,106,120,.10);
  background: linear-gradient(180deg, #ffffff 0%, #f5fafb 100%);
}

.barcode-record-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.barcode-record-main h5{
  margin:0;
  font-size:20px;
  color:#0f172a;
}

.barcode-record-meta{
  color:#64748b;
  line-height:1.6;
}

.barcode-record-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  flex-shrink:0;
}

.barcode-record-actions .btn{
  min-width:112px;
}

.barcode-empty-state{
  padding:28px 24px;
  border-radius:18px;
  border:1px dashed rgba(14,106,120,.22);
  background:#f9fbfc;
  color:#64748b;
  text-align:center;
}

.barcode-pager-shell{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-top:10px;
}

.barcode-pager-summary{
  color:#64748b;
}

.barcode-pager-summary strong{
  color:#0f172a;
}

.barcode-pager-controls{
  display:flex;
  align-items:center;
  gap:10px;
}

.barcode-pager-page{
  color:#475569;
  font-weight:700;
}

.barcode-pager-btn{
  border:none;
  border-radius:12px;
  padding:10px 14px;
  background:#0f7787;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}

.barcode-pager-btn:disabled{
  background:#d7e4e8;
  color:#78909c;
  cursor:not-allowed;
}

@media (max-width: 1320px){
  .barcode-mini-grid,
  .barcode-code-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .barcode-code-chip.wide{
    grid-column: span 2;
  }

  .barcode-main-grid,
  .barcode-sub-grid{
    grid-template-columns: 1fr;
  }

  .barcode-action-bar{
    grid-template-columns:minmax(0, 1fr) auto;
    align-items:stretch;
  }

  .barcode-registry-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .barcode-desk-head,
  .barcode-desk-toolbar,
  .barcode-desk-body{
    padding-left:20px;
    padding-right:20px;
  }

  .barcode-desk-head{
    padding-top:20px;
    padding-bottom:18px;
  }

  .barcode-desk-record-top,
  .barcode-desk-pager{
    flex-direction:column;
    align-items:stretch;
  }

  .barcode-desk-actions{
    justify-content:flex-start;
  }

  .barcode-desk-preview-layout,
  .barcode-desk-timeline-grid,
  .barcode-desk-info-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .field-span-2,
  .barcode-code-chip.wide{
    grid-column: span 1;
  }

  .barcode-mini-grid,
  .barcode-form-grid,
  .barcode-code-grid,
  .barcode-lookup-grid{
    grid-template-columns: 1fr;
  }

  .barcode-action-bar{
    grid-template-columns:1fr;
  }

  .barcode-action-buttons{
    width:100%;
    flex-wrap:wrap;
  }

  .barcode-action-input-shell{
    width:100%;
  }

  .barcode-action-buttons .btn{
    width:100%;
  }

  .barcode-preview-stage{
    min-height:340px;
  }

  .barcode-svg-shell{
    width:100%;
    padding:18px;
  }

  .barcode-record-item{
    flex-direction:column;
    align-items:flex-start;
  }

  .barcode-record-actions,
  .barcode-pager-controls{
    width:100%;
  }

  .barcode-registry-search{
    min-width:0;
    width:100%;
  }

  .barcode-pager-shell{
    flex-direction:column;
    align-items:flex-start;
  }

  .barcode-desk-head{
    flex-direction:column;
  }

  .barcode-desk-head-actions,
  .barcode-desk-toolbar-actions{
    width:100%;
  }

  .barcode-desk-search-bar,
  .barcode-desk-search-shell{
    width:100%;
  }

  .barcode-desk-search-shell{
    padding:10px 12px;
  }

  .barcode-desk-search-kicker{
    min-width:62px;
    padding:0 12px;
  }

  .barcode-desk-head-actions .btn,
  .barcode-desk-toolbar-actions .btn,
  .barcode-desk-actions .btn,
  .barcode-desk-pager .barcode-pager-btn{
    width:100%;
  }
}


/* =========================
   LOYALTY PROGRAM (V2 UI)
   Safe additions – won't break existing sections
========================= */

.loy-summary{
  display:grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap:14px;
}
.loy-summary-card{
  background: rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.12);
  border-radius: var(--radius2);
  padding:14px;
  color:#fff;
}
.loy-summary-card .loy-k{ font-size:12px; color: rgba(255,255,255,.75); }
.loy-summary-card .loy-v{ font-size:22px; font-weight:900; margin-top:6px; }
.loy-summary-card .loy-h{ margin-top:6px; }

@media (max-width: 980px){
  .loy-summary{ grid-template-columns: 1fr; }
}

.loy-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
@media (max-width: 980px){
  .loy-grid{ grid-template-columns: 1fr; }
}

.loy-card{
  background: var(--panel);
  border-radius: var(--radius2);
  padding:16px;
  box-shadow: var(--shadow);
}

.loy-card-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}

.loy-title{
  font-size:16px;
  font-weight:900;
  letter-spacing:.2px;
}

.loy-label{
  display:block;
  font-size:12px;
  font-weight:700;
  color:#374151;
  margin-bottom:6px;
}

.loy-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  min-height:26px;
}
.loy-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background: #f3f6fb;
  border:1px solid var(--line);
  border-radius: 999px;
  padding:6px 10px;
  font-size:12px;
}
.loy-chip b{ font-weight:800; }
.loy-chip button{
  border:none;
  background: transparent;
  cursor:pointer;
  font-weight:900;
  color:#6b7280;
}
.loy-chip button:hover{ color:#111827; }

.loy-vgrid .row{ gap:10px; }

.loy-inline{
  min-width: 240px;
}
@media (max-width: 980px){
  .loy-inline{ min-width: 180px; }
}

.loy-slab-form{
  border-top:1px solid var(--line);
  padding-top:12px;
}
.loy-slab-row{
  display:grid;
  grid-template-columns: 1.2fr .8fr .9fr .9fr .7fr;
  gap:12px;
  align-items:end;
}
@media (max-width: 1100px){
  .loy-slab-row{ grid-template-columns: 1fr 1fr; }
}

.loy-slab-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:flex-start;
}

.btn.ghost{
  background:#fff;
  border:1px dashed var(--line);
}

.table td .pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  background:#f3f6fb;
  border:1px solid var(--line);
}

/* Slab row alignment override */
#view-loyalty .loy-slab-row{
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

#view-loyalty .loy-slab-row > div{
  min-width: 0;
}

#view-loyalty .loy-slab-row .input,
#view-loyalty .loy-slab-actions .btn{
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
}

#view-loyalty .loy-slab-actions{
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 8px;
}

#view-loyalty .loy-slab-actions .chk{
  display: flex;
  align-items: center;
  min-height: 20px;
  margin-top: 0;
  white-space: nowrap;
}

#view-loyalty .loy-slab-actions .btn{
  min-width: 0;
}

@media (max-width: 1280px){
  #view-loyalty .loy-slab-row{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px){
  #view-loyalty .loy-slab-row{
    grid-template-columns: 1fr;
  }
}

/* Loyalty summary text visibility fix */
#view-loyalty .loy-summary-card{
  background: #f3f5f9;
  border: 1px solid #d7deea;
  color: #0f172a;
}

#view-loyalty .loy-summary-card .loy-k{
  color: #475569;
}

#view-loyalty .loy-summary-card .loy-v{
  color: #0b1736;
}

#view-loyalty .loy-summary-card .loy-h,
#view-loyalty .loy-summary-card .muted{
  color: #64748b;
}


/* =========================
   WARRANTY DETAIL PANEL
========================= */

.warranty-detail-panel{
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  background:#fff;
  padding:16px;
}

.warranty-detail-empty{
  border:1px dashed rgba(0,0,0,.12);
  border-radius:14px;
  padding:18px;
  color:var(--muted);
  background:#f8fbff;
}

.warranty-detail-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}

.warranty-stat-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(160px, 1fr));
  gap:12px;
  margin-top:14px;
}

.warranty-stat-card{
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  padding:12px 14px;
  background:#fbfdff;
}

.warranty-stat-card .k{
  font-size:12px;
  color:var(--muted);
}

.warranty-stat-card .v{
  margin-top:6px;
  font-size:18px;
  font-weight:800;
  color:var(--ink);
  word-break:break-word;
}

.warranty-partner-btn{
  padding:0;
  border:none;
  background:transparent;
  color:#0f5f8c;
  font-weight:800;
  cursor:pointer;
  text-align:left;
}

.warranty-partner-btn:hover{
  text-decoration:underline;
}

.btn.linkish{
  background:transparent;
  border:none;
  box-shadow:none;
}

.tiny{
  font-size:12px;
}

@media (max-width: 980px){
  .warranty-detail-head{
    flex-direction:column;
    align-items:stretch;
  }

  .warranty-stat-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 640px){
  .warranty-stat-grid{
    grid-template-columns:1fr;
  }
}



/* Warranty fit improvements */
#view-warranties .panel-actions{
  gap: 8px;
}

#view-warranties .panel-actions .input,
#view-warranties .panel-actions input,
#view-warranties .panel-actions select{
  flex: 1 1 150px;
  font-size: 12px;
  padding: 9px 11px;
}

#view-warranties .panel-actions .btn{
  padding: 9px 14px;
  font-size: 12px;
}

#warrantyTable{
  min-width: 0;
  table-layout: fixed;
}

#warrantyTable thead th,
#warrantyTable tbody td{
  font-size: 12px;
}

#warrantyTable thead th{
  padding: 9px 8px;
}

#warrantyTable tbody td{
  padding: 10px 8px;
}

#warrantyTable th:nth-child(1),
#warrantyTable td:nth-child(1){
  width: 13%;
}

#warrantyTable th:nth-child(2),
#warrantyTable td:nth-child(2){
  width: 15%;
}

#warrantyTable th:nth-child(3),
#warrantyTable td:nth-child(3){
  width: 10%;
}

#warrantyTable th:nth-child(4),
#warrantyTable td:nth-child(4){
  width: 13%;
}

#warrantyTable th:nth-child(5),
#warrantyTable td:nth-child(5){
  width: 10%;
}

#warrantyTable th:nth-child(6),
#warrantyTable td:nth-child(6){
  width: 17%;
}

#warrantyTable th:nth-child(7),
#warrantyTable td:nth-child(7){
  width: 22%;
}

#warrantyTable td,
#warrantyTable th{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#warrantyTable .warranty-partner-btn{
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  display: inline-block;
}

@media (max-width: 1280px){
  #view-warranties .panel-actions{
    justify-content: flex-start;
  }

  #warrantyTable thead th,
  #warrantyTable tbody td{
    font-size: 11px;
  }
}
#warrantyTable thead th,
  #warrantyTable tbody td{
    font-size: 11px;
  }
}



/* Warranty toolbar refresh */
#view-warranties .panel{
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

#view-warranties .panel-head{
  align-items: stretch;
  gap: 18px;
}

#view-warranties .panel-head > div:first-child{
  max-width: 360px;
}

#view-warranties .panel-head h3{
  margin-bottom: 8px;
  font-size: 18px;
}

#view-warranties .panel-head .muted{
  line-height: 1.6;
}

#view-warranties .warranty-toolbar{
  flex: 1 1 720px;
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid rgba(14,106,120,.12);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(247,250,252,.96), rgba(235,243,247,.92));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    0 18px 32px rgba(15, 59, 71, .08);
}

#view-warranties .warranty-toolbar-block{
  min-width: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(14,106,120,.10);
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

#view-warranties .warranty-toolbar-kicker{
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #0e6a78;
}

#view-warranties .warranty-toolbar-search-input{
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(15,59,71,.10);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

#view-warranties .warranty-toolbar-search-input:focus,
#view-warranties .warranty-toolbar-field .input:focus{
  border-color: rgba(14,106,120,.45);
  box-shadow: 0 0 0 5px rgba(14,106,120,.10);
}

#view-warranties .warranty-toolbar-date-row{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#view-warranties .warranty-toolbar-field{
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  color: #47606a;
  font-size: 12px;
  font-weight: 700;
}

#view-warranties .warranty-toolbar-field .input{
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(15,59,71,.10);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

#view-warranties .warranty-toolbar-actions{
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

#view-warranties .warranty-toolbar-btn{
  position: relative;
  overflow: hidden;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(15,59,71,.10);
  background: linear-gradient(180deg, #ffffff 0%, #eef5f8 100%);
  box-shadow: 0 10px 18px rgba(15,59,71,.08);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease;
}

#view-warranties .warranty-toolbar-btn::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.42) 50%, transparent 100%);
  transform: translateX(-140%);
  transition: transform .42s ease;
  pointer-events: none;
}

#view-warranties .warranty-toolbar-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(14,106,120,.24);
  box-shadow: 0 14px 24px rgba(15,59,71,.14);
}

#view-warranties .warranty-toolbar-btn:hover::after{
  transform: translateX(140%);
}

#view-warranties .warranty-toolbar-btn:active{
  transform: translateY(0);
}

#view-warranties .warranty-toolbar-btn.primary{
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #0e6a78 0%, #1491a1 100%);
}

#view-warranties .warranty-toolbar-btn.warranty-toolbar-btn-secondary{
  color: #0b5560;
}

#view-warranties .warranty-toolbar-btn.warranty-toolbar-btn-export{
  color: #0c3240;
  background: linear-gradient(135deg, #ffffff 0%, #e8f4f8 100%);
}

#warrantyTable th:nth-child(1),
#warrantyTable td:nth-child(1){
  width: 12%;
}

#warrantyTable th:nth-child(2),
#warrantyTable td:nth-child(2){
  width: 14%;
}

#warrantyTable th:nth-child(3),
#warrantyTable td:nth-child(3){
  width: 10%;
}

#warrantyTable th:nth-child(4),
#warrantyTable td:nth-child(4){
  width: 13%;
}

#warrantyTable th:nth-child(5),
#warrantyTable td:nth-child(5){
  width: 10%;
}

#warrantyTable th:nth-child(6),
#warrantyTable td:nth-child(6){
  width: 16%;
}

#warrantyTable th:nth-child(7),
#warrantyTable td:nth-child(7){
  width: 13%;
}

#warrantyTable th:nth-child(8),
#warrantyTable td:nth-child(8){
  width: 12%;
}

@media (max-width: 1380px){
  #view-warranties .warranty-toolbar{
    grid-template-columns: 1fr;
  }

  #view-warranties .warranty-toolbar-actions{
    justify-content: flex-start;
  }
}

@media (max-width: 820px){
  #view-warranties .warranty-toolbar-date-row{
    grid-template-columns: 1fr;
  }

  #view-warranties .warranty-toolbar-actions{
    flex-direction: column;
  }

  #view-warranties .warranty-toolbar-btn{
    width: 100%;
  }
}


/* Redemptions overflow fix */
#view-redemptions .panel{
  overflow: hidden;
}

#view-redemptions .panel-head{
  gap: 10px;
}

#view-redemptions .panel-actions{
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
}

#view-redemptions .panel-actions .btn{
  padding: 9px 12px;
  font-size: 12px;
}

#view-redemptions .table-wrap{
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

#view-redemptions #redeemTable{
  min-width: 0 !important;
  width: 100%;
  table-layout: fixed;
}

#view-redemptions #redeemTable thead th,
#view-redemptions #redeemTable tbody td{
  font-size: 11px;
  padding: 8px 7px;
}

#view-redemptions #redeemTable thead th:nth-child(1),
#view-redemptions #redeemTable tbody td:nth-child(1){
  width: 26%;
}

#view-redemptions #redeemTable thead th:nth-child(2),
#view-redemptions #redeemTable tbody td:nth-child(2){
  width: 9%;
}

#view-redemptions #redeemTable thead th:nth-child(3),
#view-redemptions #redeemTable tbody td:nth-child(3){
  width: 12%;
}

#view-redemptions #redeemTable thead th:nth-child(4),
#view-redemptions #redeemTable tbody td:nth-child(4){
  width: 15%;
}

#view-redemptions #redeemTable thead th:nth-child(5),
#view-redemptions #redeemTable tbody td:nth-child(5){
  width: 10%;
}

#view-redemptions #redeemTable thead th:nth-child(6),
#view-redemptions #redeemTable tbody td:nth-child(6){
  width: 10%;
}

#view-redemptions #redeemTable thead th:nth-child(7),
#view-redemptions #redeemTable tbody td:nth-child(7){
  width: 18%;
}

#view-redemptions #redeemTable .actions-inline{
  gap: 4px;
  flex-wrap: wrap;
}

#view-redemptions #redeemTable .btn.sm{
  min-width: 58px;
  padding: 5px 6px;
  font-size: 9px;
}

@media (max-width: 1280px){
  #view-redemptions .panel-actions{
    justify-content: flex-start;
  }

  #view-redemptions #redeemTable thead th,
  #view-redemptions #redeemTable tbody td{
    font-size: 10px;
  }
}


/* Redemption folders */
.redeem-folder-bar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
  margin-bottom:8px;
}

.redeem-folder-btn{
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  border-radius:999px;
  padding:8px 14px;
  font-weight:700;
  cursor:pointer;
}

.redeem-folder-btn.active{
  background:rgba(14,106,120,.12);
  border-color:rgba(14,106,120,.22);
  color:var(--primary2);
}


/* Redemption status colors */
.redemption-status-pill.redemption-status-pending{
  background: rgba(219, 142, 0, .14) !important;
  border-color: rgba(219, 142, 0, .18) !important;
  color: #a85f00 !important;
}

.redemption-status-pill.redemption-status-approved{
  background: rgba(30, 125, 59, .14) !important;
  border-color: rgba(30, 125, 59, .18) !important;
  color: #1e7d3b !important;
}

.redemption-status-pill.redemption-status-rejected{
  background: rgba(192, 57, 43, .14) !important;
  border-color: rgba(192, 57, 43, .18) !important;
  color: #c0392b !important;
}

/* Redemption workspace alignment */
.redeem-folder-bar{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin:18px 0 12px;
}

.redeem-folder-btn{
  min-width:156px;
  height:56px;
  padding:0 22px;
  border:1px solid rgba(15, 36, 64, .12);
  border-radius:999px;
  background:#fff;
  color:var(--text);
  font-size:16px;
  font-weight:800;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 24px rgba(13, 31, 54, .05);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.redeem-folder-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(13, 31, 54, .08);
}

.redeem-folder-btn.active{
  background:rgba(14,106,120,.14);
  border-color:rgba(14,106,120,.22);
  color:var(--primary2);
}

#view-redemptions #redeemTable{
  min-width:0 !important;
  width:100%;
  table-layout:fixed;
}

#view-redemptions #redeemTable thead th,
#view-redemptions #redeemTable tbody td{
  font-size:11px;
  padding:10px 12px;
  vertical-align:top;
}

#view-redemptions #redeemTable thead th{
  white-space:nowrap;
  letter-spacing:.01em;
}

#view-redemptions #redeemTable tbody td{
  border-bottom:1px solid rgba(15, 36, 64, .08);
}

#view-redemptions #redeemTable thead th:nth-child(1),
#view-redemptions #redeemTable tbody td:nth-child(1){
  width:25%;
}

#view-redemptions #redeemTable thead th:nth-child(2),
#view-redemptions #redeemTable tbody td:nth-child(2){
  width:8%;
}

#view-redemptions #redeemTable thead th:nth-child(3),
#view-redemptions #redeemTable tbody td:nth-child(3){
  width:10%;
}

#view-redemptions #redeemTable thead th:nth-child(4),
#view-redemptions #redeemTable tbody td:nth-child(4){
  width:13%;
}

#view-redemptions #redeemTable thead th:nth-child(5),
#view-redemptions #redeemTable tbody td:nth-child(5){
  width:12%;
}

#view-redemptions #redeemTable thead th:nth-child(6),
#view-redemptions #redeemTable tbody td:nth-child(6){
  width:12%;
}

#view-redemptions #redeemTable thead th:nth-child(7),
#view-redemptions #redeemTable tbody td:nth-child(7){
  width:20%;
}

#view-redemptions #redeemTable tbody td:nth-child(2),
#view-redemptions #redeemTable tbody td:nth-child(5),
#view-redemptions #redeemTable tbody td:nth-child(6){
  white-space:nowrap;
}

.redemption-date-cell{
  white-space:normal !important;
}

.redemption-date-stack{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}

.redemption-date-stack > div:first-child{
  color:#102434;
  font-weight:800;
}

.redemption-date-stack .muted{
  font-size:10px;
  line-height:1.3;
  color:#66788a;
  white-space:normal;
}

#view-redemptions #redeemTable .pill.redemption-status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  max-width:100%;
  padding:5px 12px;
  border-radius:999px;
  font-size:8px;
  font-weight:800;
  letter-spacing:.02em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.redemption-status-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:7px;
}

.redemption-inline-view-btn{
  min-width:92px !important;
  padding:7px 14px !important;
  font-size:9px !important;
  line-height:1.1;
}

.redemption-actions-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
}

.redemption-actions-stack .btn.sm,
#view-redemptions #redeemTable .btn.sm{
  box-sizing:border-box;
  border-radius:999px;
  font-size:9px;
  line-height:1.1;
}

.redemption-actions-stack .btn.sm{
  width:138px;
  min-width:138px !important;
  padding:8px 12px !important;
  justify-content:center;
}

.redemption-actions-stack .btn.success.sm{
  font-size:8.5px !important;
  letter-spacing:.01em;
}

#view-redemptions #redeemTable .actions-inline{
  gap:6px;
  flex-wrap:wrap;
}

@media (max-width: 1480px){
  .redeem-folder-btn{
    min-width:142px;
    height:52px;
    font-size:15px;
  }

  #view-redemptions #redeemTable thead th,
  #view-redemptions #redeemTable tbody td{
    font-size:10px;
    padding:9px 10px;
  }

  #view-redemptions #redeemTable thead th:nth-child(1),
  #view-redemptions #redeemTable tbody td:nth-child(1){
    width:24%;
  }

  #view-redemptions #redeemTable thead th:nth-child(6),
  #view-redemptions #redeemTable tbody td:nth-child(6){
    width:13%;
  }

  #view-redemptions #redeemTable thead th:nth-child(7),
  #view-redemptions #redeemTable tbody td:nth-child(7){
    width:21%;
  }

  .redemption-actions-stack .btn.sm{
    width:128px;
    min-width:128px !important;
    padding:7px 10px !important;
  }
}

@media (max-width: 1280px){
  .redeem-folder-btn{
    min-width:128px;
    height:48px;
    padding:0 18px;
    font-size:14px;
  }

  #view-redemptions #redeemTable .pill.redemption-status-pill{
    min-height:30px;
    padding:5px 10px;
    font-size:7.5px;
  }

  .redemption-inline-view-btn{
    min-width:84px !important;
    padding:6px 12px !important;
    font-size:8.5px !important;
  }

  .redemption-actions-stack .btn.sm{
    width:118px;
    min-width:118px !important;
    padding:7px 9px !important;
    font-size:8.5px !important;
  }

  .redemption-actions-stack .btn.success.sm{
    font-size:8px !important;
  }
}



.manual-redemption-card{
  margin-top:16px;
  margin-bottom:14px;
  padding:14px;
  border:1px solid rgba(14,106,120,.12);
  border-radius:16px;
  background:linear-gradient(180deg, #fbfdff 0%, #f5fbff 100%);
}

.manual-redemption-head{
  margin-bottom:10px;
}

.manual-redemption-grid{
  display:grid;
  grid-template-columns: 1fr 1fr 1.4fr auto;
  gap:10px;
  align-items:center;
}

@media (max-width: 1100px){
  .manual-redemption-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 700px){
  .manual-redemption-grid{
    grid-template-columns:1fr;
  }
}


/* Minimum redemption control */
.redemption-settings-card{
  margin-top:16px;
  margin-bottom:10px;
  padding:14px 16px;
  border:1px solid rgba(14,106,120,.12);
  border-radius:16px;
  background:linear-gradient(180deg, #fbfdff 0%, #f5fbff 100%);
}

.redemption-settings-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:10px;
}

.redemption-settings-head h4{
  margin:0 0 4px;
  font-size:16px;
}

.redemption-settings-pill{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(14,106,120,.10);
  color:var(--primary2);
  border:1px solid rgba(14,106,120,.14);
  font-weight:700;
  white-space:nowrap;
}

.redemption-settings-grid{
  display:grid;
  grid-template-columns:minmax(180px, 220px) 1fr auto;
  gap:12px;
  align-items:end;
}

.redemption-settings-meta{
  min-height:44px;
  display:flex;
  align-items:center;
  color:var(--muted);
  font-size:13px;
  line-height:1.4;
}

.redemption-settings-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
}

@media (max-width: 1080px){
  .redemption-settings-grid{
    grid-template-columns:1fr;
    align-items:stretch;
  }

  .redemption-settings-head{
    flex-direction:column;
  }
}



/* =========================
   PARTNER PROFILE MANAGEMENT
========================= */
.partner-profile-shell{
  display:block;
}

.partner-profile-directory{
  background:linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
}

.partner-profile-mini-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:10px;
}

.partner-profile-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:16px;
}

.partner-profile-card-grid.cols-2{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.partner-profile-card-grid.cols-4{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

.partner-profile-card-grid.cols-6{
  grid-template-columns:repeat(6, minmax(0, 1fr));
}

.partner-unlock-card,
.partner-directory-item{
  width:100%;
  border:1px solid rgba(14,106,120,.12);
  background:linear-gradient(180deg, #ffffff 0%, #f3f8fa 100%);
  border-radius:18px;
  padding:18px;
  text-align:left;
  cursor:pointer;
  box-shadow: 0 12px 24px rgba(15, 71, 87, .08);
  display:flex;
  flex-direction:column;
  min-height:100%;
}

.partner-toolbar-btn{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:78px;
  padding:14px 18px;
  border-radius:20px;
  background:linear-gradient(180deg, #ffffff 0%, #f4f8fb 100%);
  border:1px solid rgba(14,106,120,.12);
  box-shadow:0 12px 24px rgba(15, 71, 87, .07);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  justify-content:flex-start;
  overflow:hidden;
}

.partner-toolbar-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(14,106,120,.24);
  box-shadow:0 16px 30px rgba(15, 71, 87, .11);
}

.partner-toolbar-btn.active{
  background:linear-gradient(135deg, #0f6675 0%, #1392a4 100%);
  color:#fff;
  border-color:rgba(14,106,120,.28);
}

.partner-toolbar-btn-ghost{
  background:linear-gradient(180deg, #fbfdff 0%, #eff6f8 100%);
}

.partner-toolbar-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(15,102,117,.1);
  color:#0f6675;
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  flex:0 0 auto;
}

.partner-toolbar-btn.active .partner-toolbar-icon{
  background:rgba(255,255,255,.18);
  color:#fff;
}

.partner-toolbar-copy{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  min-width:0;
  flex:1 1 auto;
  text-align:left;
}

.partner-toolbar-copy strong{
  font-size:13px;
  line-height:1.1;
  display:block;
  width:100%;
}

.partner-toolbar-copy small{
  font-size:10px;
  line-height:1.2;
  color:#69808f;
  display:block;
  width:100%;
}

.partner-toolbar-btn.active .partner-toolbar-copy small{
  color:rgba(255,255,255,.8);
}

.partner-toolbar-btn .badge{
  min-width:34px;
  width:34px;
  height:34px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(15,102,117,.12);
  color:inherit;
  font-weight:800;
  margin-left:10px;
  flex:0 0 34px;
  font-size:13px;
  line-height:1;
}

.partner-toolbar-btn.active .badge{
  background:rgba(255,255,255,.18);
}

.partner-profile-toolbar{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:10px;
  border-radius:24px;
  background:linear-gradient(180deg, rgba(240,246,249,.9) 0%, rgba(232,241,245,.92) 100%);
  border:1px solid rgba(14,106,120,.08);
}

.partner-toolbar-row{
  display:flex;
  gap:14px;
  width:100%;
  align-items:stretch;
}

.partner-toolbar-row-top{
  flex-wrap:nowrap;
}

.partner-toolbar-row-bottom{
  justify-content:flex-start;
  align-items:stretch;
}

.partner-search-wrap{
  flex:1 1 0;
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border-radius:20px;
  background:#fff;
  border:1px solid rgba(14,106,120,.12);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}

.partner-search-wrap .input{
  border:0;
  box-shadow:none;
  background:transparent;
  padding:0;
  min-height:auto;
}

.partner-search-wrap .input:focus{
  outline:none;
}

.partner-search-chip{
  flex:0 0 auto;
  padding:8px 11px;
  border-radius:12px;
  background:linear-gradient(135deg, #0f6675 0%, #1392a4 100%);
  color:#fff;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

#partnerProfileReloadBtn{
  flex:0 0 190px;
  min-width:190px;
}

#partnerProfileUnlockRequestsBtn,
#partnerProfileUnlockApprovedBtn,
#partnerProfileAdminHistoryBtn{
  flex:1 1 0;
  min-width:0;
  max-width:420px;
}

.partner-admin-history-card{
  width:100%;
  border:1px solid rgba(14,106,120,.12);
  background:linear-gradient(180deg, #ffffff 0%, #f6fafc 100%);
  border-radius:18px;
  padding:18px;
  text-align:left;
  box-shadow: 0 12px 24px rgba(15, 71, 87, .08);
  cursor:pointer;
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.partner-admin-history-card:hover,
.partner-admin-history-card.active{
  transform:translateY(-1px);
  border-color:rgba(14,106,120,.26);
  box-shadow:0 16px 30px rgba(15, 71, 87, .12);
}

.partner-admin-history-card .partner-directory-top span{
  font-size:12px;
  color:#667b88;
}

.partner-admin-history-detail{
  width:100%;
}

.partner-admin-history-detail-card{
  border:1px solid rgba(14,106,120,.12);
  background:linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
  border-radius:22px;
  padding:20px;
  box-shadow:0 16px 34px rgba(15, 71, 87, .10);
}

.partner-admin-history-stats{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  margin-top:12px;
}

.partner-admin-history-stat{
  padding:10px 12px;
  border-radius:14px;
  background:#eef6f8;
  border:1px solid rgba(14,106,120,.10);
}

.partner-admin-history-stat .k{
  display:block;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#69808f;
  margin-bottom:6px;
}

.partner-admin-history-stat strong{
  font-size:20px;
  color:#0f2234;
}

.partner-history-detail-box{
  margin-top:10px;
  padding:10px 12px;
  border-radius:14px;
  background:#f6fafc;
  border:1px solid rgba(14,106,120,.10);
}

.partner-history-detail-line{
  font-size:12px;
  line-height:1.45;
  color:#647b89;
}

.partner-history-detail-line + .partner-history-detail-line{
  margin-top:4px;
}

.partner-history-detail-line strong{
  color:#0f2234;
}

.partner-audit-trail-box{
  margin-top:14px;
  padding:14px;
  border-radius:16px;
  background:linear-gradient(180deg, #f9fcfd 0%, #f1f7f9 100%);
  border:1px solid rgba(14,106,120,.10);
}

.partner-audit-trail-head{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:#69808f;
  margin-bottom:10px;
  font-weight:800;
}

.partner-audit-trail-item{
  padding:12px 0;
  border-top:1px solid rgba(14,106,120,.08);
}

.partner-audit-trail-item:first-of-type{
  border-top:0;
  padding-top:0;
}

.partner-audit-trail-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:4px;
}

.partner-audit-trail-top strong{
  color:#0f2234;
}

.partner-audit-trail-top span,
.partner-audit-trail-meta{
  font-size:12px;
  color:#667b88;
}

.partner-audit-trail-desc{
  font-size:13px;
  color:#4f6572;
  margin-top:2px;
}

.partner-audit-trail-changes{
  margin-top:8px;
  font-size:12px;
  color:#647b89;
  display:grid;
  gap:4px;
}

.partner-profile-subhead{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:14px;
}

.partner-profile-subhead h4{
  margin:6px 0 0;
  font-size:24px;
  color:#0f2234;
}

.partner-profile-subhead-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.partner-grid-view-switch{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px;
  border-radius:999px;
  background:linear-gradient(180deg, #f7fbfd 0%, #edf5f7 100%);
  border:1px solid rgba(14,106,120,.12);
}

.partner-grid-view-btn{
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid transparent;
  background:transparent;
  color:#5d7584;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  transition:transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.partner-grid-view-btn:hover{
  transform:translateY(-1px);
  background:#fff;
  color:#0f6675;
  border-color:rgba(14,106,120,.14);
}

.partner-grid-view-btn.active{
  background:linear-gradient(135deg, #0f6675 0%, #1392a4 100%);
  color:#fff;
  border-color:rgba(14,106,120,.24);
  box-shadow:0 10px 18px rgba(15, 71, 87, .14);
}

.partner-unlock-card:hover,
.partner-directory-item:hover,
.partner-directory-item.active{
  border-color:rgba(14,106,120,.28);
  background:linear-gradient(180deg, #fbfeff 0%, #f3fbfd 100%);
}

.partner-profile-directory-list{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:16px;
}

.partner-directory-top,
.partner-history-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}

.partner-directory-top > div{
  min-width:0;
  flex:1 1 auto;
}

.partner-directory-top strong{
  display:block;
  margin-top:4px;
  line-height:1.15;
  word-break:break-word;
}

.partner-directory-foot,
.partner-unlock-time{
  margin-top:8px;
  font-size:12px;
  color:var(--muted);
}

.partner-directory-meta{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:16px;
  color:#465467;
  font-size:13px;
}

.partner-directory-foot{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  margin-top:14px;
}

.partner-directory-cta{
  margin-top:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  background:#0f6675;
  color:#fff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.03em;
  width:100%;
  min-height:54px;
  text-align:center;
  margin-top:auto;
}

.partner-directory-cta-icon{
  font-size:12px;
  line-height:1;
  opacity:.92;
}

.partner-profile-card-grid.cols-4{
  gap:14px;
}

.partner-profile-card-grid.cols-4 .partner-directory-item{
  padding:16px;
}

.partner-profile-card-grid.cols-4 .partner-directory-top{
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}

.partner-profile-card-grid.cols-4 .partner-status-pill{
  align-self:flex-start;
  max-width:100%;
  padding:6px 11px;
  font-size:10px;
  min-height:30px;
}

.partner-profile-card-grid.cols-4 .partner-directory-meta{
  margin-top:14px;
  font-size:12px;
  gap:5px;
}

.partner-profile-card-grid.cols-4 .partner-directory-foot{
  margin-top:12px;
  font-size:11px;
}

.partner-profile-card-grid.cols-4 .partner-directory-cta{
  min-height:50px;
  padding:10px 12px;
  font-size:11px;
}

.partner-profile-card-grid.cols-6{
  gap:12px;
}

.partner-profile-card-grid.cols-6 .partner-directory-item{
  padding:14px;
}

.partner-profile-card-grid.cols-6 .eyebrow{
  font-size:10px;
  letter-spacing:.1em;
}

.partner-profile-card-grid.cols-6 .partner-directory-top{
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
}

.partner-profile-card-grid.cols-6 .partner-directory-top strong{
  font-size:15px;
  line-height:1.08;
}

.partner-profile-card-grid.cols-6 .partner-status-pill{
  align-self:flex-start;
  max-width:100%;
  padding:5px 10px;
  font-size:9px;
  min-height:26px;
}

.partner-profile-card-grid.cols-6 .partner-directory-meta{
  margin-top:12px;
  font-size:11px;
  gap:4px;
}

.partner-profile-card-grid.cols-6 .partner-directory-foot{
  margin-top:10px;
  font-size:10px;
  gap:6px;
}

.partner-profile-card-grid.cols-6 .partner-directory-cta{
  min-height:46px;
  padding:8px 10px;
  font-size:10px;
  border-radius:18px;
  gap:6px;
}

.partner-profile-card-grid.cols-6 .partner-directory-cta-icon{
  font-size:11px;
}

.partner-profile-card-grid.cols-6 .partner-directory-cta span:first-child{
  letter-spacing:.04em;
}

.partner-profile-main-grid{
  display:grid;
  grid-template-columns:minmax(0, 1.6fr) minmax(260px, .84fr);
  gap:16px;
}

.partner-profile-form-stack,
.partner-profile-side-stack{
  display:flex;
  flex-direction:column;
  gap:12px;
  position:sticky;
  top:18px;
  align-self:start;
}

.partner-profile-hero{
  position:relative;
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:flex-start;
  background:linear-gradient(135deg, #0f6675 0%, #1392a4 100%);
  color:#fff;
  border:1px solid rgba(255,255,255,.12);
  box-shadow: 0 20px 40px rgba(10, 58, 69, .18);
}

.partner-profile-hero .muted{
  color:rgba(255,255,255,.82);
}

.partner-profile-hero-media{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  flex:0 0 132px;
}

.partner-profile-photo-button{
  width:132px;
  height:132px;
  padding:0;
  border-radius:50%;
  border:3px solid rgba(255,255,255,.82);
  background:rgba(255,255,255,.1);
  overflow:hidden;
  display:grid;
  place-items:center;
  box-shadow:0 20px 36px rgba(7,43,50,.24);
  cursor:pointer;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background-color .18s ease;
}

.partner-profile-photo-button:hover:not(:disabled){
  transform:translateY(-2px);
  border-color:#ffffff;
  box-shadow:0 24px 40px rgba(7,43,50,.3);
}

.partner-profile-photo-button:disabled{
  cursor:default;
  opacity:.95;
}

.partner-profile-photo-button.is-empty{
  background:linear-gradient(135deg, rgba(255,255,255,.14) 0%, rgba(14,79,92,.78) 100%);
}

.partner-profile-photo-image{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.partner-profile-photo-fallback{
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  font-size:46px;
  font-weight:900;
  letter-spacing:.06em;
  color:#ffffff;
  text-transform:uppercase;
}

.partner-profile-photo-download{
  min-height:34px;
  padding:0 14px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  background:rgba(255,255,255,.96);
  color:#0f2233;
  border-color:rgba(255,255,255,.28);
}

.partner-profile-photo-download:hover:not(:disabled){
  background:#ffffff;
  border-color:rgba(255,255,255,.36);
}

.partner-profile-photo-download:disabled{
  opacity:.6;
  cursor:not-allowed;
}

.partner-profile-hero-copy{
  flex:1 1 320px;
  min-width:0;
}

.partner-profile-ribbon{
  position:relative;
  padding:8px 12px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  background:rgba(255,255,255,.16);
  color:#fff;
  border:1px solid rgba(255,255,255,.2);
  backdrop-filter:blur(8px);
}

.partner-profile-ribbon.approved{
  background:rgba(117, 255, 197, .18);
  border-color:rgba(117, 255, 197, .28);
}

.partner-profile-ribbon.pending,
.partner-profile-ribbon.attention{
  background:rgba(255, 217, 89, .2);
  border-color:rgba(255, 217, 89, .34);
}

.partner-profile-ribbon.blocked,
.partner-profile-ribbon.locked{
  background:rgba(255, 117, 117, .18);
  border-color:rgba(255, 117, 117, .28);
}

.partner-profile-hero-copy h3{
  font-size:42px;
  line-height:1.02;
  margin:10px 0 8px;
  letter-spacing:-.03em;
}

.partner-profile-hero-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:12px;
  min-width:520px;
  padding-top:22px;
}

.partner-profile-hero-status-row{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.partner-profile-hero-action-row{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.partner-hero-btn{
  min-height:44px;
  padding:0 16px;
  border-radius:16px;
  font-size:13px;
  font-weight:800;
  box-shadow:none;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease;
}

.partner-hero-btn:hover:not(:disabled){
  transform:translateY(-2px);
}

.partner-hero-btn-soft{
  background:rgba(255,255,255,.94);
  color:#0f2233;
}

.partner-hero-btn-soft:hover:not(:disabled){
  background:#ffffff;
  box-shadow:0 14px 26px rgba(10,58,69,.18);
}

.partner-hero-btn-strong{
  background:rgba(9, 69, 80, .96);
  color:#fff;
  border-color:rgba(255,255,255,.08);
}

.partner-hero-btn-strong:hover:not(:disabled){
  background:#0b5560;
  box-shadow:0 16px 28px rgba(7,43,50,.24);
}

.partner-hero-btn-warn{
  background:rgba(255,255,255,.94);
  color:#8f3b0d;
}

.partner-hero-btn-warn:hover:not(:disabled){
  background:#fff7ed;
  border-color:rgba(180,83,9,.22);
  box-shadow:0 14px 26px rgba(143,59,13,.14);
}

.partner-hero-btn-save{
  background:#0d5f6f;
  border-color:#0d5f6f;
  color:#fff;
  min-width:150px;
}

.partner-hero-btn-save:hover:not(:disabled){
  background:#0f6f81;
  border-color:#0f6f81;
  box-shadow:0 16px 28px rgba(8,69,81,.24);
}

.partner-summary-strip{
  display:grid;
  grid-template-columns:repeat(6, minmax(0, 1fr));
  gap:12px;
}

.partner-progress-wrap{
  padding:16px 18px;
  border-radius:18px;
  background:linear-gradient(180deg, #ffffff 0%, #f5fafb 100%);
  border:1px solid rgba(14,106,120,.12);
  box-shadow:0 12px 24px rgba(15,71,87,.06);
}

.partner-progress-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.partner-progress-head strong{
  color:#0f2c3e;
  font-size:16px;
}

.partner-progress-track{
  height:12px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(15,102,117,.12);
}

.partner-progress-bar{
  width:0;
  height:100%;
  border-radius:999px;
  transition:width .35s ease;
  background:linear-gradient(90deg, #ff8b74 0%, #ffbe5c 100%);
}

.partner-progress-bar.is-mid{
  background:linear-gradient(90deg, #ffd760 0%, #7fdc8c 100%);
}

.partner-progress-bar.is-complete{
  background:linear-gradient(90deg, #59deb0 0%, #b6ff78 100%);
}

.partner-progress-bar.is-low{
  background:linear-gradient(90deg, #ff7b75 0%, #ffb057 100%);
}

.partner-summary-card{
  background:linear-gradient(180deg, #ffffff 0%, #f5fafb 100%);
  border:1px solid rgba(14,106,120,.12);
  border-radius:18px;
  padding:16px;
  box-shadow:0 12px 24px rgba(15,71,87,.06);
}

.partner-summary-label{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#66788a;
}

.partner-summary-value{
  margin-top:8px;
  font-size:16px;
  font-weight:800;
  color:#0f172a;
  line-height:1.35;
}

.partner-profile-card-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:12px;
}

.partner-profile-side-card-compact{
  padding:10px 12px !important;
  border-radius:18px;
}

.partner-profile-side-card-compact .partner-profile-card-head{
  margin-bottom:8px;
}

.partner-profile-side-card-compact .eyebrow{
  font-size:10px;
  letter-spacing:.14em;
}

.partner-profile-side-card-compact h4{
  margin:3px 0 0;
  font-size:15px;
  letter-spacing:-.01em;
}

.partner-profile-card{
  border:1px solid rgba(14,106,120,.10);
  box-shadow:0 14px 30px rgba(15,71,87,.06);
}

.partner-profile-card h4{
  margin:6px 0 0;
  font-size:22px;
  letter-spacing:-.02em;
}

.partner-section-note{
  margin:8px 0 0;
  color:#677789;
  font-size:13px;
  line-height:1.5;
}

.partner-profile-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.partner-span-2{
  grid-column:1 / -1;
}

.textarea{
  min-height:92px;
  resize:vertical;
}

.partner-checkbox{
  justify-content:flex-end;
}

.partner-checkbox input{
  width:18px;
  height:18px;
}

.partner-doc-link{
  padding:10px 12px;
  border-radius:12px;
  border:1px dashed rgba(14,106,120,.18);
  background:#f7fbfd;
  font-size:13px;
}

.partner-doc-link a{
  color:var(--primary);
  font-weight:700;
  text-decoration:none;
}

.partner-doc-link a:hover{
  text-decoration:underline;
}

.partner-flag-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.partner-flag-item{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
  padding:8px 10px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  background:#fbfdff;
  min-height:40px;
}

.partner-flag-item span:first-child{
  font-size:11px;
  line-height:1.2;
  color:#435769;
}

.partner-flag-pill,
.partner-status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 12px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  background:#eef6fb;
  color:var(--primary2);
  min-height:34px;
}

.partner-flag-pill.ok{
  background:rgba(30,125,59,.12);
  color:#1e7d3b;
}

.partner-flag-pill.warn{
  background:rgba(192,57,43,.12);
  color:#c0392b;
}

.partner-status-pill.approved{
  background:rgba(30,125,59,.14);
  color:#1e7d3b;
}

.partner-status-pill.pending{
  background:rgba(219,142,0,.14);
  color:#a85f00;
}

.partner-status-pill.blocked{
  background:rgba(192,57,43,.14);
  color:#c0392b;
}

.partner-status-pill.locked{
  background:rgba(11,85,96,.14);
  color:#0b5560;
}

.partner-status-pill.open{
  background:rgba(30,125,59,.14);
  color:#1e7d3b;
}

.partner-history-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:580px;
  overflow:auto;
}

.partner-command-center{
  background:linear-gradient(180deg, #0f1f2c 0%, #173243 100%);
  color:#fff;
  padding:16px 18px !important;
  border-radius:22px;
}

.partner-command-center .eyebrow,
.partner-command-center h4,
.partner-command-center .partner-command-note{
  color:#fff;
}

.partner-command-center .partner-profile-card-head{
  margin-bottom:8px;
}

.partner-command-center .eyebrow{
  font-size:10px;
  letter-spacing:.14em;
}

.partner-command-center h4{
  margin:2px 0 0;
  font-size:14px;
  letter-spacing:-.01em;
}

.partner-command-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }

.partner-command-grid .btn{
    min-height:36px;
    padding:8px 12px;
    font-size:11px;
    font-weight:800;
    border-radius:14px;
    letter-spacing:.01em;
    transition:
      transform .18s ease,
      box-shadow .18s ease,
      background-color .18s ease,
      border-color .18s ease,
      color .18s ease;
}

.partner-command-grid .btn:hover:not(:disabled){
    transform:translateY(-2px);
    box-shadow:0 12px 24px rgba(7, 20, 32, .22);
}

.partner-command-grid .btn:active:not(:disabled){
    transform:translateY(0);
    box-shadow:0 6px 12px rgba(7, 20, 32, .16);
}

.partner-command-grid .btn.primary:hover:not(:disabled){
    background:#1a7282;
    border-color:transparent;
}

.partner-command-grid .btn.danger:hover:not(:disabled){
    background:#d64533;
    border-color:transparent;
}

.partner-command-grid .btn:not(.primary):not(.danger):hover:not(:disabled){
    background:#ffffff;
    border-color:rgba(255,255,255,.52);
    color:#0f2234;
}

.partner-command-note{
    margin-top:8px;
    font-size:10px;
    line-height:1.35;
    color:rgba(255,255,255,.76);
  }

.partner-doc-preview-stack{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.partner-doc-preview-card{
  border:1px solid rgba(14,106,120,.10);
  border-radius:16px;
  padding:12px;
  background:#fbfdff;
}

.partner-doc-preview-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  margin-bottom:10px;
  font-size:13px;
  font-weight:800;
}

#partnerProfileFlagsPanel .partner-flag-list{
  gap:6px;
}

.partner-mini-flag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:28px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(15,102,117,.10);
  background:#f6fafb;
  color:#264454;
  white-space:nowrap;
}

.partner-mini-flag-dot{
  width:7px;
  height:7px;
  border-radius:999px;
  background:currentColor;
  opacity:.9;
}

.partner-mini-flag-label{
  font-size:10px;
  font-weight:700;
  letter-spacing:.01em;
}

.partner-mini-flag-value{
  font-size:9px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  opacity:.88;
}

.partner-mini-flag.ok{
  background:rgba(30,125,59,.10);
  border-color:rgba(30,125,59,.14);
  color:#1f7a3a;
}

.partner-mini-flag.warn{
  background:rgba(192,57,43,.10);
  border-color:rgba(192,57,43,.14);
  color:#bc3d2a;
}

.partner-doc-preview-head a{
  color:var(--primary);
  text-decoration:none;
}

.partner-doc-preview-body{
  min-height:140px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px dashed rgba(14,106,120,.16);
  border-radius:14px;
  background:#f5fafb;
  overflow:hidden;
}

.partner-doc-preview-button{
  position:relative;
  width:100%;
  min-height:220px;
  border:0;
  padding:0;
  background:transparent;
  cursor:pointer;
  display:block;
}

.partner-doc-preview-button-file{
  min-height:160px;
}

.partner-doc-preview-image{
  width:100%;
  height:220px;
  object-fit:cover;
  display:block;
}

.partner-doc-preview-overlay{
  position:absolute;
  left:14px;
  right:14px;
  bottom:14px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(15,32,44,.68);
  color:#fff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.partner-doc-file-tile{
  text-align:center;
  padding:16px;
}

.partner-doc-file-label{
  font-size:14px;
  font-weight:800;
  margin-bottom:8px;
}

.partner-doc-modal-card{
  width:min(1080px, 92vw);
  max-height:88vh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.partner-doc-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:20px 22px 14px;
  border-bottom:1px solid rgba(14,106,120,.12);
}

.partner-doc-modal-body{
  padding:22px;
  overflow:auto;
  background:linear-gradient(180deg, #f5fafb 0%, #eef5f7 100%);
}

.partner-doc-modal-stage{
  border:1px solid rgba(14,106,120,.12);
  border-radius:18px;
  background:#fff;
  min-height:220px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.partner-doc-modal-stage.is-expanded{
  min-height:70vh;
}

.partner-doc-modal-image{
  width:100%;
  max-height:52vh;
  object-fit:contain;
  background:#fff;
}

.partner-doc-modal-image.is-expanded{
  max-height:70vh;
}

.partner-doc-modal-frame{
  width:100%;
  min-height:70vh;
  border:0;
  background:#fff;
  display:block;
}

.partner-doc-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:16px;
}

.partner-timeline-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.partner-timeline-item{
  display:grid;
  grid-template-columns:12px minmax(0, 1fr);
  gap:10px;
  align-items:flex-start;
  padding:4px 0;
}

.partner-timeline-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  margin-top:4px;
  background:#8ba4b1;
  box-shadow:0 0 0 4px rgba(139,164,177,.14);
}

.partner-timeline-item.ok .partner-timeline-dot{
  background:#1e7d3b;
  box-shadow:0 0 0 4px rgba(30,125,59,.14);
}

.partner-timeline-item.warn .partner-timeline-dot{
  background:#c47b10;
  box-shadow:0 0 0 4px rgba(196,123,16,.14);
}

.partner-timeline-item.neutral .partner-timeline-dot{
  background:#0f6675;
  box-shadow:0 0 0 4px rgba(15,102,117,.12);
}

.partner-timeline-label{
  font-size:12px;
  font-weight:800;
  color:#0f172a;
}

.partner-timeline-value{
  margin-top:2px;
  font-size:11px;
  color:#617285;
  line-height:1.35;
}

#partnerProfileTimelinePanel .partner-timeline-list{
  gap:6px;
}

#partnerProfileTimelinePanel .partner-timeline-item{
  grid-template-columns:10px minmax(0, 1fr);
  gap:8px;
  padding:3px 0;
}

#partnerProfileTimelinePanel .partner-timeline-dot{
  width:8px;
  height:8px;
  margin-top:4px;
  box-shadow:0 0 0 3px rgba(139,164,177,.14);
}

#partnerProfileTimelinePanel .partner-timeline-item.ok .partner-timeline-dot{
  box-shadow:0 0 0 3px rgba(30,125,59,.14);
}

#partnerProfileTimelinePanel .partner-timeline-item.warn .partner-timeline-dot{
  box-shadow:0 0 0 3px rgba(196,123,16,.14);
}

#partnerProfileTimelinePanel .partner-timeline-item.neutral .partner-timeline-dot{
  box-shadow:0 0 0 3px rgba(15,102,117,.12);
}

#partnerProfileTimelinePanel .partner-timeline-label{
  font-size:11px;
}

#partnerProfileTimelinePanel .partner-timeline-value{
  margin-top:1px;
  font-size:10px;
  line-height:1.25;
}

#partnerProfileTimelinePanel.panel,
#partnerProfileTimelinePanel.partner-profile-side-card,
#partnerProfileFlagsPanel.partner-profile-side-card{
  padding:10px 12px;
}

#partnerProfileTimelinePanel .partner-profile-card-head,
#partnerProfileFlagsPanel .partner-profile-card-head{
  margin-bottom:8px;
}

#partnerProfileTimelinePanel .partner-profile-card-head h4,
#partnerProfileFlagsPanel .partner-profile-card-head h4{
  font-size:15px;
}

@media (max-width: 980px){
  .partner-flag-list{
    gap:6px;
  }
}

.partner-history-item{
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  padding:12px;
  background:#fbfdff;
}

.partner-history-body{
  margin-top:8px;
  font-size:13px;
}

.partner-history-foot{
  margin-top:6px;
  font-size:12px;
}

.partner-profile-card:not(.is-editing) .input:not([type="file"]),
.partner-profile-card:not(.is-editing) .textarea{
  background:#f7f9fc;
}

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

  .partner-summary-strip{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }

  .partner-profile-side-stack{
    position:static;
  }
}

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

  .partner-span-2{
    grid-column:auto;
  }

  .partner-profile-hero{
    flex-direction:column;
    padding-top:72px;
  }

  .partner-profile-hero-media{
    align-items:flex-start;
  }

  .partner-profile-hero-actions{
    justify-content:flex-start;
    align-items:flex-start;
    min-width:0;
    width:100%;
    padding-top:0;
  }

  .partner-profile-ribbon{
    position:relative;
  }

  .partner-profile-hero-status-row,
  .partner-profile-hero-action-row{
    justify-content:flex-start;
  }

  .partner-profile-hero-copy h3{
    font-size:30px;
  }

  .partner-summary-strip{
    grid-template-columns:1fr;
  }

  .partner-command-grid{
    grid-template-columns:1fr;
  }

  .partner-profile-subhead{
    flex-direction:column;
    align-items:flex-start;
  }

  .partner-profile-subhead-actions{
    width:100%;
    justify-content:space-between;
  }

  .partner-profile-card-grid,
  .partner-profile-card-grid.cols-2,
  .partner-profile-card-grid.cols-4,
  .partner-profile-card-grid.cols-6{
    grid-template-columns:1fr;
  }

  .partner-profile-toolbar{
    padding:0;
    background:transparent;
    border:0;
  }

  .partner-toolbar-row,
  .partner-toolbar-row-top,
  .partner-toolbar-row-bottom{
    flex-direction:column;
  }

  .partner-search-wrap{
    width:100%;
  }

  .partner-toolbar-btn{
    width:100%;
  }
}

@media print{
  .sidebar,
  .topbar,
  .partner-profile-landing,
  .partner-profile-hero-actions .btn,
  .partner-command-center{
    display:none !important;
  }

  .main,
  .panel,
  .partner-profile-card,
  .partner-profile-side-card{
    box-shadow:none !important;
    background:#fff !important;
  }

  body{
    background:#fff !important;
  }

  .partner-profile-content,
  #partnerProfileContent{
    display:block !important;
  }

  .partner-profile-main-grid{
    grid-template-columns:1fr 1fr;
  }
}


/* Receipt modal layout stabilization */
.redemption-receipt-modal-card{
  width:min(1180px, 97vw);
}

.redemption-receipt-sheet,
.redemption-receipt-summary,
.redemption-receipt-sections,
.redemption-receipt-section,
.redemption-receipt-kv,
.redemption-receipt-kv-row{
  min-width:0;
}

.redemption-receipt-section{
  overflow:hidden;
}

.redemption-receipt-kv-row{
  grid-template-columns:minmax(132px, 160px) minmax(0, 1fr);
  align-items:start;
}

.redemption-receipt-kv-row span,
.redemption-receipt-kv-row strong{
  min-width:0;
}

.redemption-receipt-kv-row strong{
  display:block;
  width:100%;
  white-space:normal;
  word-break:normal;
  overflow-wrap:anywhere;
}

@media (max-width: 760px){
  .redemption-receipt-kv-row{
    grid-template-columns:1fr;
  }
}


/* Warranty compact registry refresh */
#view-warranties .warranty-toolbar{
  grid-template-columns: minmax(320px, 1.4fr) minmax(330px, auto) auto;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
}

#view-warranties .warranty-toolbar-block{
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

#view-warranties .warranty-toolbar-kicker{
  display: none;
}

#view-warranties .warranty-toolbar-search-block{
  display: flex;
  align-items: center;
  gap: 8px;
}

#view-warranties .warranty-toolbar-search-block::before{
  content: "Search";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(14,106,120,.10);
  color: #0e6a78;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

#view-warranties .warranty-toolbar-search-input{
  min-height: 40px;
  padding: 8px 12px;
}

#view-warranties .warranty-toolbar-range-block{
  display: flex;
  align-items: center;
  gap: 8px;
}

#view-warranties .warranty-toolbar-range-block::before{
  content: "Date";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(12,50,64,.08);
  color: #0c3240;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

#view-warranties .warranty-toolbar-date-row{
  display: flex;
  align-items: center;
  gap: 8px;
}

#view-warranties .warranty-toolbar-field{
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  white-space: nowrap;
}

#view-warranties .warranty-toolbar-field span{
  min-width: 28px;
  font-size: 11px;
  font-weight: 800;
  color: #47606a;
  text-transform: uppercase;
  letter-spacing: .05em;
}

#view-warranties .warranty-toolbar-field .input{
  width: 168px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
}

#view-warranties .warranty-toolbar-actions{
  gap: 8px;
  align-items: center;
}

#view-warranties .warranty-toolbar-btn{
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 13px;
}

#view-warranties .warranty-detail-panel{
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

#view-warranties #warrantyPartnerTable thead th,
#view-warranties #warrantyPartnerTable tbody td{
  font-size: 12px;
}

#view-warranties #warrantyPartnerTable th:nth-child(1),
#view-warranties #warrantyPartnerTable td:nth-child(1){
  width: 13%;
}

#view-warranties #warrantyPartnerTable th:nth-child(2),
#view-warranties #warrantyPartnerTable td:nth-child(2){
  width: 12%;
}

#view-warranties #warrantyPartnerTable th:nth-child(3),
#view-warranties #warrantyPartnerTable td:nth-child(3){
  width: 10%;
}

#view-warranties #warrantyPartnerTable th:nth-child(4),
#view-warranties #warrantyPartnerTable td:nth-child(4){
  width: 13%;
}

#view-warranties #warrantyPartnerTable th:nth-child(5),
#view-warranties #warrantyPartnerTable td:nth-child(5){
  width: 11%;
}

#view-warranties #warrantyPartnerTable th:nth-child(6),
#view-warranties #warrantyPartnerTable td:nth-child(6){
  width: 13%;
}

#view-warranties #warrantyPartnerTable th:nth-child(7),
#view-warranties #warrantyPartnerTable td:nth-child(7){
  width: 14%;
}

#view-warranties #warrantyPartnerTable th:nth-child(8),
#view-warranties #warrantyPartnerTable td:nth-child(8){
  width: 14%;
}

@media (max-width: 1320px){
  #view-warranties .warranty-toolbar{
    grid-template-columns: 1fr;
  }

  #view-warranties .warranty-toolbar-range-block{
    justify-content: flex-start;
  }

  #view-warranties .warranty-toolbar-actions{
    justify-content: flex-start;
  }
}

@media (max-width: 760px){
  #view-warranties .warranty-toolbar-date-row{
    flex-wrap: wrap;
  }

  #view-warranties .warranty-toolbar-field{
    width: 100%;
  }

  #view-warranties .warranty-toolbar-field .input{
    width: 100%;
  }

  #view-warranties .warranty-toolbar-actions{
    flex-direction: column;
    align-items: stretch;
  }

  #view-warranties .warranty-toolbar-btn{
    width: 100%;
  }
}



/* Warranty overflow alignment fix */
#view-warranties .table-wrap{
  overflow-x: auto;
  overflow-y: hidden;
}

#view-warranties #warrantyTable,
#view-warranties #warrantyPartnerTable{
  width: 100%;
  table-layout: fixed;
}

#view-warranties #warrantyTable thead th,
#view-warranties #warrantyTable tbody td,
#view-warranties #warrantyPartnerTable thead th,
#view-warranties #warrantyPartnerTable tbody td{
  vertical-align: top;
}

#view-warranties #warrantyTable td:nth-child(4),
#view-warranties #warrantyTable td:nth-child(7),
#view-warranties #warrantyTable td:nth-child(8),
#view-warranties #warrantyPartnerTable td:nth-child(4),
#view-warranties #warrantyPartnerTable td:nth-child(6),
#view-warranties #warrantyPartnerTable td:nth-child(7){
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.42;
}

#view-warranties #warrantyTable td:nth-child(6),
#view-warranties #warrantyPartnerTable td:nth-child(8){
  white-space: nowrap;
}

#view-warranties #warrantyTable .warranty-partner-btn{
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

#view-warranties #warrantyTable td:nth-child(8) > div:first-child,
#view-warranties #warrantyTable td:nth-child(8) > div:last-child,
#view-warranties #warrantyPartnerTable td:nth-child(7) > div:first-child,
#view-warranties #warrantyPartnerTable td:nth-child(7) > div:last-child{
  display: block;
  max-width: 100%;
}

#view-warranties #warrantyTable td:nth-child(8) .tiny,
#view-warranties #warrantyPartnerTable td:nth-child(7) .tiny{
  margin-top: 4px;
  white-space: normal;
}

#view-warranties #warrantyTable th:nth-child(1),
#view-warranties #warrantyTable td:nth-child(1){
  width: 12%;
}

#view-warranties #warrantyTable th:nth-child(2),
#view-warranties #warrantyTable td:nth-child(2){
  width: 14%;
}

#view-warranties #warrantyTable th:nth-child(3),
#view-warranties #warrantyTable td:nth-child(3){
  width: 10%;
}

#view-warranties #warrantyTable th:nth-child(4),
#view-warranties #warrantyTable td:nth-child(4){
  width: 13%;
}

#view-warranties #warrantyTable th:nth-child(5),
#view-warranties #warrantyTable td:nth-child(5){
  width: 10%;
}

#view-warranties #warrantyTable th:nth-child(6),
#view-warranties #warrantyTable td:nth-child(6){
  width: 15%;
}

#view-warranties #warrantyTable th:nth-child(7),
#view-warranties #warrantyTable td:nth-child(7){
  width: 13%;
}

#view-warranties #warrantyTable th:nth-child(8),
#view-warranties #warrantyTable td:nth-child(8){
  width: 13%;
}

@media (max-width: 1400px){
  #view-warranties #warrantyTable,
  #view-warranties #warrantyPartnerTable{
    min-width: 1100px;
  }
}


/* Warranty bill preview upgrade */
.modal{
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.partner-doc-modal-actions{
  flex-wrap: wrap;
  align-items: center;
}

.partner-doc-modal-actions .btn{
  min-height: 42px;
  border-radius: 12px;
}

#view-warranties #warrantyTable,
#view-warranties #warrantyPartnerTable{
  min-width: 1240px;
}

#view-warranties #warrantyTable td:nth-child(5),
#view-warranties #warrantyTable td:nth-child(8),
#view-warranties #warrantyTable td:nth-child(9),
#view-warranties #warrantyPartnerTable td:nth-child(5),
#view-warranties #warrantyPartnerTable td:nth-child(7),
#view-warranties #warrantyPartnerTable td:nth-child(8){
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.42;
}

#view-warranties #warrantyTable td:nth-child(7),
#view-warranties #warrantyPartnerTable td:nth-child(9){
  white-space: nowrap;
}

#view-warranties #warrantyTable th:nth-child(1),
#view-warranties #warrantyTable td:nth-child(1){
  width: 12%;
}

#view-warranties #warrantyTable th:nth-child(2),
#view-warranties #warrantyTable td:nth-child(2){
  width: 13%;
}

#view-warranties #warrantyTable th:nth-child(3),
#view-warranties #warrantyTable td:nth-child(3){
  width: 9%;
}

#view-warranties #warrantyTable th:nth-child(4),
#view-warranties #warrantyTable td:nth-child(4){
  width: 10%;
}

#view-warranties #warrantyTable th:nth-child(5),
#view-warranties #warrantyTable td:nth-child(5){
  width: 12%;
}

#view-warranties #warrantyTable th:nth-child(6),
#view-warranties #warrantyTable td:nth-child(6){
  width: 10%;
}

#view-warranties #warrantyTable th:nth-child(7),
#view-warranties #warrantyTable td:nth-child(7){
  width: 13%;
}

#view-warranties #warrantyTable th:nth-child(8),
#view-warranties #warrantyTable td:nth-child(8){
  width: 10%;
}

#view-warranties #warrantyTable th:nth-child(9),
#view-warranties #warrantyTable td:nth-child(9){
  width: 11%;
}

#view-warranties #warrantyPartnerTable th:nth-child(1),
#view-warranties #warrantyPartnerTable td:nth-child(1){
  width: 12%;
}

#view-warranties #warrantyPartnerTable th:nth-child(2),
#view-warranties #warrantyPartnerTable td:nth-child(2){
  width: 12%;
}

#view-warranties #warrantyPartnerTable th:nth-child(3),
#view-warranties #warrantyPartnerTable td:nth-child(3){
  width: 9%;
}

#view-warranties #warrantyPartnerTable th:nth-child(4),
#view-warranties #warrantyPartnerTable td:nth-child(4){
  width: 10%;
}

#view-warranties #warrantyPartnerTable th:nth-child(5),
#view-warranties #warrantyPartnerTable td:nth-child(5){
  width: 13%;
}

#view-warranties #warrantyPartnerTable th:nth-child(6),
#view-warranties #warrantyPartnerTable td:nth-child(6){
  width: 10%;
}

#view-warranties #warrantyPartnerTable th:nth-child(7),
#view-warranties #warrantyPartnerTable td:nth-child(7){
  width: 11%;
}

#view-warranties #warrantyPartnerTable th:nth-child(8),
#view-warranties #warrantyPartnerTable td:nth-child(8){
  width: 11%;
}

#view-warranties #warrantyPartnerTable th:nth-child(9),
#view-warranties #warrantyPartnerTable td:nth-child(9){
  width: 12%;
}

.warranty-bill-button{
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 7px 9px;
  border: 1px solid rgba(14,106,120,.16);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #edf7f9 100%);
  color: #0d5666;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  box-shadow: 0 8px 18px rgba(13,86,102,.08);
}

.warranty-bill-button:hover{
  transform: translateY(-1px);
  border-color: rgba(14,106,120,.28);
  box-shadow: 0 12px 26px rgba(13,86,102,.14);
}

.warranty-bill-thumb,
.warranty-bill-icon{
  width: 42px;
  height: 42px;
  border-radius: 10px;
  flex: 0 0 42px;
}

.warranty-bill-thumb{
  object-fit: cover;
  border: 1px solid rgba(14,106,120,.14);
  background: #fff;
}

.warranty-bill-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0e6a78 0%, #1e98b3 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.warranty-bill-meta{
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: left;
  line-height: 1.3;
}

.warranty-bill-empty{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(12,50,64,.05);
  color: #7b8a95;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1400px){
  #view-warranties #warrantyTable,
  #view-warranties #warrantyPartnerTable{
    min-width: 1320px;
  }
}
/* end warranty bill preview upgrade */


/* Warranty pagination refinement */
#view-warranties .warranty-toolbar-view-cluster{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 6px 4px 4px;
  border-radius: 12px;
  border: 1px solid rgba(15,59,71,.10);
  background: linear-gradient(180deg, #ffffff 0%, #eef5f8 100%);
  box-shadow: 0 10px 18px rgba(15,59,71,.08);
}

#view-warranties .warranty-toolbar-view-label{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(14,106,120,.12) 0%, rgba(20,145,161,.18) 100%);
  color: #0e6a78;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

#view-warranties .warranty-toolbar-view-select{
  min-width: 146px;
  min-height: 32px;
  padding: 6px 28px 6px 10px;
  border: none;
  box-shadow: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: #244754;
}

#view-warranties .warranty-toolbar-view-select:focus{
  outline: none;
  box-shadow: none;
}

#view-warranties .warranty-pager-shell{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 10px;
}

#view-warranties .warranty-pager-summary{
  display: flex;
  align-items: center;
  gap: 8px;
  color: #40616c;
  font-size: 13px;
  font-weight: 700;
}

#view-warranties .warranty-pager-summary strong{
  color: #0c3240;
}

#view-warranties .warranty-pager-controls{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1 1 auto;
}

#view-warranties .warranty-pager-pages{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#view-warranties .warranty-pager-btn{
  min-width: 40px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(15,59,71,.10);
  border-radius: 11px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f7f9 100%);
  color: #0c3240;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15,59,71,.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

#view-warranties .warranty-pager-btn:hover:not(:disabled){
  transform: translateY(-1px);
  border-color: rgba(14,106,120,.24);
  box-shadow: 0 12px 24px rgba(15,59,71,.14);
}

#view-warranties .warranty-pager-btn.is-active{
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #0e6a78 0%, #1491a1 100%);
  box-shadow: 0 14px 26px rgba(14,106,120,.22);
}

#view-warranties .warranty-pager-btn:disabled{
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

#view-warranties .warranty-pager-nav{
  min-width: 66px;
}

.warranty-bill-button{
  width: auto;
  min-width: 112px;
  max-width: 122px;
  gap: 8px;
  min-height: 42px;
  padding: 5px 8px;
  border-radius: 12px;
}

.warranty-bill-thumb,
.warranty-bill-icon{
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex: 0 0 32px;
}

.warranty-bill-meta{
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.warranty-bill-empty{
  min-height: 42px;
  width: auto;
  padding: 7px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.employee-create-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.employee-panel-card-grid{
  margin-bottom:0;
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.employee-panel-card-btn{
  width:100%;
  min-height:168px;
  padding:18px 20px;
  border:1px solid rgba(15,59,71,.10);
  appearance:none;
  -webkit-appearance:none;
  background:var(--panel);
  font:inherit;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  text-align:left;
  cursor:pointer;
  border-radius:18px;
  transition:transform .24s cubic-bezier(.22,.88,.28,1), box-shadow .24s ease, border-color .24s ease, background .24s ease, color .24s ease;
}

.employee-panel-card-btn::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg, rgba(14,106,120,.06) 0%, rgba(20,145,161,.03) 100%);
  opacity:0;
  transition:opacity .24s ease;
  z-index:-2;
}

.employee-panel-card-btn::after{
  content:"";
  position:absolute;
  inset:-20% auto -20% -40%;
  width:42%;
  background:linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.52) 52%, rgba(255,255,255,0) 100%);
  transform:translateX(-180%) skewX(-18deg);
  opacity:0;
  pointer-events:none;
  z-index:-1;
  transition:transform .7s ease, opacity .24s ease;
}

.employee-panel-card-btn:hover{
  transform:translateY(-6px) scale(1.01);
  border-color:rgba(14,106,120,.18);
  box-shadow:0 22px 40px rgba(15,59,71,.16);
}

.employee-panel-card-btn:hover::before{
  opacity:1;
}

.employee-panel-card-btn:hover::after{
  transform:translateX(420%) skewX(-18deg);
  opacity:.9;
}

.employee-panel-card-btn:active{
  transform:translateY(-1px) scale(.985);
}

.employee-panel-card-btn:focus-visible{
  outline:3px solid rgba(20,145,161,.24);
  outline-offset:2px;
}

.employee-panel-card-btn.is-active{
  border-color:transparent;
  background:linear-gradient(135deg, #0e6a78 0%, #1491a1 100%);
  box-shadow:0 24px 42px rgba(14,106,120,.26);
  animation:employeePanelCardActivate .38s cubic-bezier(.2,.9,.24,1);
}

.employee-panel-card-btn.is-active::before{
  opacity:1;
}

.employee-panel-card-count{
  position:absolute;
  top:12px;
  right:12px;
  min-width:24px;
  height:24px;
  padding:0 7px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(15,59,71,.08);
  color:#334155;
  font-size:11px;
  font-weight:800;
  line-height:1;
  box-shadow:inset 0 0 0 1px rgba(15,59,71,.08);
}

.employee-panel-card-label{
  font-size:11px;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.employee-panel-card-title{
  display:block;
  font-size:20px;
  font-weight:800;
  line-height:1.12;
  color:#1f2937;
  max-width:11ch;
}

.employee-panel-card-sub{
  display:block;
  font-size:12px;
  line-height:1.42;
  max-width:24ch;
}

.employee-panel-card-btn.is-active .employee-panel-card-label,
.employee-panel-card-btn.is-active .employee-panel-card-sub,
.employee-panel-card-btn.is-active .employee-panel-card-title{
  color:#fff;
}

.employee-panel-card-btn.is-active .employee-panel-card-label,
.employee-panel-card-btn.is-active .employee-panel-card-sub{
  color:rgba(255,255,255,.84);
}

.employee-panel-card-btn.is-active .employee-panel-card-count{
  background:rgba(255,255,255,.16);
  color:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.16);
}

.employee-request-filter-bar{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin:18px 0 8px;
}

.employee-request-filter-btn{
  min-width:148px;
  height:44px;
  padding:0 18px;
  border:1px solid rgba(15, 36, 64, .12);
  border-radius:999px;
  background:#fff;
  color:var(--text);
  font:inherit;
  font-size:14px;
  font-weight:800;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(13, 31, 54, .05);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.employee-request-filter-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(13, 31, 54, .08);
}

.employee-request-filter-btn.active{
  background:rgba(14,106,120,.14);
  border-color:rgba(14,106,120,.22);
  color:var(--primary2);
}

.employee-activity-directory-list{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-top:18px;
}

.employee-activity-empty-card,
.employee-activity-empty{
  padding:20px 22px;
  border-radius:20px;
  border:1px dashed rgba(15,59,71,.18);
  background:linear-gradient(180deg, rgba(255,255,255,.78) 0%, rgba(239,248,251,.92) 100%);
  color:#5c7084;
}

.employee-activity-empty{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.employee-activity-empty strong{
  color:#10263c;
  font-size:18px;
}

.employee-activity-empty p{
  margin:0;
  font-size:14px;
  line-height:1.55;
}

.employee-activity-person-card{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:12px;
  min-height:140px;
  width:100%;
  padding:16px 18px;
  border-radius:20px;
  border:1px solid rgba(15,59,71,.12);
  background:linear-gradient(180deg, #ffffff 0%, #f5fbfd 100%);
  text-align:left;
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
  box-shadow:0 12px 28px rgba(15,59,71,.08);
}

.employee-activity-person-card:hover{
  transform:translateY(-3px);
  border-color:rgba(14,106,120,.22);
  box-shadow:0 18px 34px rgba(15,59,71,.12);
}

.employee-activity-person-card:focus-visible{
  outline:3px solid rgba(20,145,161,.22);
  outline-offset:2px;
}

.employee-activity-person-card.is-active{
  border-color:transparent;
  background:linear-gradient(135deg, #0e6a78 0%, #1491a1 100%);
  box-shadow:0 22px 42px rgba(14,106,120,.24);
}

.employee-activity-person-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.employee-activity-person-name{
  display:block;
  margin:0;
  font-size:18px;
  font-weight:800;
  line-height:1.2;
  color:#10263c;
}

.employee-activity-person-card.is-active .employee-activity-person-name,
.employee-activity-person-card.is-active .employee-activity-person-meta,
.employee-activity-person-card.is-active .employee-activity-person-stats span{
  color:#fff;
}

.employee-activity-person-meta{
  font-size:13px;
  color:#62748a;
  line-height:1.5;
}

.employee-activity-person-stats{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:auto;
}

.employee-activity-person-stats span{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(14,106,120,.08);
  color:#0f4b58;
  font-size:12px;
  font-weight:700;
}

.employee-activity-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:72px;
  height:28px;
  padding:0 10px;
  border-radius:999px;
  background:#f2f6fa;
  color:#294258;
  font-size:12px;
  font-weight:700;
  border:1px solid rgba(15,59,71,.08);
}

.employee-activity-status.status-active{
  background:rgba(22,163,74,.10);
  color:#187a42;
}

.employee-activity-status.status-blocked{
  background:rgba(211,70,58,.10);
  color:#a1312a;
}

.employee-activity-person-card.is-active .employee-activity-status{
  background:rgba(255,255,255,.18);
  color:#fff;
  border-color:rgba(255,255,255,.18);
}

.employee-activity-detail{
  padding:18px;
  border-radius:24px;
  border:1px solid rgba(15,59,71,.10);
  background:linear-gradient(180deg, #ffffff 0%, #f7fbfd 100%);
  box-shadow:0 14px 28px rgba(15,59,71,.08);
}

.employee-activity-detail-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

.employee-activity-detail-head h4{
  margin:0;
  font-size:28px;
}

.employee-activity-filter-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  margin-top:18px;
}

.employee-activity-filter-btn{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  min-height:112px;
  width:100%;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(15,59,71,.10);
  background:#fff;
  text-align:left;
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
  box-shadow:0 10px 24px rgba(15,59,71,.06);
}

.employee-activity-filter-btn:hover{
  transform:translateY(-2px);
  border-color:rgba(14,106,120,.18);
  box-shadow:0 16px 28px rgba(15,59,71,.10);
}

.employee-activity-filter-btn:focus-visible{
  outline:3px solid rgba(20,145,161,.22);
  outline-offset:2px;
}

.employee-activity-filter-btn.is-active{
  border-color:transparent;
  background:linear-gradient(135deg, #0e6a78 0%, #1491a1 100%);
  box-shadow:0 18px 32px rgba(14,106,120,.22);
}

.employee-activity-filter-label{
  display:block;
  padding-right:34px;
  font-size:15px;
  font-weight:800;
  color:#13263a;
  line-height:1.25;
}

.employee-activity-filter-sub{
  display:block;
  font-size:12px;
  line-height:1.45;
  color:#68798d;
}

.employee-activity-filter-count{
  position:absolute;
  top:12px;
  right:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  padding:0 8px;
  border-radius:999px;
  background:rgba(14,106,120,.09);
  color:#0f4b58;
  font-size:12px;
  font-weight:800;
}

.employee-activity-filter-btn.is-active .employee-activity-filter-label,
.employee-activity-filter-btn.is-active .employee-activity-filter-sub{
  color:#fff;
}

.employee-activity-filter-btn.is-active .employee-activity-filter-sub{
  color:rgba(255,255,255,.82);
}

.employee-activity-filter-btn.is-active .employee-activity-filter-count{
  background:rgba(255,255,255,.18);
  color:#fff;
}

.employee-activity-table-wrap{
  margin-top:14px;
}

@keyframes employeePanelCardActivate{
  0%{
    transform:translateY(10px) scale(.97);
    box-shadow:0 10px 18px rgba(14,106,120,.10);
  }
  65%{
    transform:translateY(-3px) scale(1.01);
    box-shadow:0 28px 48px rgba(14,106,120,.30);
  }
  100%{
    transform:translateY(0) scale(1);
    box-shadow:0 24px 42px rgba(14,106,120,.26);
  }
}

@media (prefers-reduced-motion: reduce){
  .employee-panel-card-btn,
  .employee-panel-card-btn::before,
  .employee-panel-card-btn::after{
    transition:none;
  }

  .employee-panel-card-btn.is-active{
    animation:none;
  }
}

.employee-notes-input{
  grid-column:1 / -1;
  resize:vertical;
  min-height:108px;
}

.employee-detail-modal-card{
  width:min(1180px, 96vw);
  max-height:92vh;
  padding:24px;
  display:flex;
  flex-direction:column;
  gap:18px;
  overflow:hidden;
}

.employee-detail-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

.employee-detail-head-actions{
  flex-wrap:wrap;
}

.employee-detail-body{
  display:flex;
  flex-direction:column;
  gap:18px;
  min-height:0;
  overflow:auto;
  padding-right:6px;
}

.employee-detail-access-strip{
  padding:16px 18px;
  border-radius:22px;
  border:1px solid rgba(15,59,71,.10);
  background:linear-gradient(180deg, #ffffff 0%, #f4fbfd 100%);
  box-shadow:0 12px 24px rgba(15,59,71,.07);
}

.employee-detail-access-strip-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.employee-detail-access-strip-head h4{
  margin:0 0 4px;
  font-size:20px;
  color:#0b2239;
}

.employee-detail-access-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:10px;
}

.employee-feature-access-chip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
  padding:11px 12px;
  border-radius:18px;
  border:1px solid rgba(15,59,71,.10);
  background:#fbfeff;
  color:#0b2239;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.employee-feature-access-chip:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 18px rgba(15,59,71,.08);
}

.employee-feature-access-chip:disabled{
  opacity:.78;
  cursor:wait;
  transform:none;
  box-shadow:none;
}

.employee-feature-access-chip.is-enabled{
  border-color:rgba(18,135,88,.22);
  background:linear-gradient(180deg, #ffffff 0%, #f2fbf6 100%);
}

.employee-feature-access-chip.is-disabled{
  border-color:rgba(191,31,51,.16);
  background:linear-gradient(180deg, #ffffff 0%, #fff4f5 100%);
}

.employee-feature-access-copy{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
  text-align:left;
}

.employee-feature-access-copy strong{
  font-size:13px;
  line-height:1.3;
}

.employee-feature-access-copy small{
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#628194;
}

.employee-feature-access-chip.is-disabled .employee-feature-access-copy small{
  color:#b4535d;
}

.employee-feature-access-toggle{
  position:relative;
  flex:0 0 auto;
  width:52px;
  height:28px;
  padding:3px;
  border-radius:999px;
  display:flex;
  align-items:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.36);
}

.employee-feature-access-chip.is-enabled .employee-feature-access-toggle{
  background:linear-gradient(135deg, #0f9f60 0%, #19bf72 100%);
}

.employee-feature-access-chip.is-disabled .employee-feature-access-toggle{
  background:linear-gradient(135deg, #d94a50 0%, #bf1f33 100%);
}

.employee-feature-access-knob{
  width:22px;
  height:22px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 7px rgba(7,26,34,.24);
  transition:transform .18s ease;
}

.employee-feature-access-chip.is-enabled .employee-feature-access-knob{
  transform:translateX(24px);
}

.employee-feature-access-state{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  font-size:9px;
  font-weight:800;
  letter-spacing:.12em;
  color:#fff;
  pointer-events:none;
}

.employee-feature-access-chip.is-enabled .employee-feature-access-state{
  left:8px;
}

.employee-feature-access-chip.is-disabled .employee-feature-access-state{
  right:8px;
}

.employee-detail-stat-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.employee-detail-stat-card{
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(15,59,71,.12);
  background:linear-gradient(180deg, #ffffff 0%, #eef6f9 100%);
  box-shadow:0 12px 24px rgba(15,59,71,.08);
}

.employee-detail-stat-card .k{
  display:block;
  margin-bottom:8px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#5b7a90;
}

.employee-detail-stat-card strong{
  display:block;
  font-size:20px;
  line-height:1.25;
  color:#0b2239;
}

.employee-detail-layout{
  display:grid;
  grid-template-columns:minmax(0, 1.15fr) minmax(0, .85fr);
  gap:16px;
  min-height:0;
  align-items:start;
}

.employee-detail-panel{
  min-height:0;
  padding:18px;
  border-radius:22px;
  border:1px solid rgba(15,59,71,.10);
  background:linear-gradient(180deg, #ffffff 0%, #f6fbfd 100%);
  box-shadow:0 12px 24px rgba(15,59,71,.07);
}

.employee-detail-profile-panel{
  display:flex;
  flex-direction:column;
}

.employee-detail-profile-panel .input:disabled,
.employee-detail-profile-panel .textarea:disabled{
  background:#f8fbfd;
  color:#617487;
  border-color:rgba(15,59,71,.10);
  cursor:not-allowed;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78);
}

.employee-detail-section-head{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-bottom:14px;
}

.employee-detail-section-head h4{
  margin:0;
  font-size:24px;
}

.employee-detail-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  align-items:start;
}

.employee-detail-field{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
}

.employee-detail-field > span{
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#56728a;
}

.employee-detail-field.span-2{
  grid-column:1 / -1;
}

.employee-detail-inline-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
}

.employee-detail-password-box{
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(14,106,120,.12);
  background:linear-gradient(180deg, #fbfeff 0%, #eff8fb 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82);
}

.employee-detail-profile-panel:not(.is-editing) .employee-detail-password-box{
  opacity:.8;
}

.employee-detail-inline-row .btn{
  white-space:nowrap;
}

.employee-detail-save-actions{
  justify-content:flex-start;
  margin-top:16px;
  position:sticky;
  bottom:0;
  padding-top:14px;
  background:linear-gradient(180deg, rgba(246,251,253,0) 0%, rgba(246,251,253,.92) 24%, #f6fbfd 100%);
  z-index:2;
}

.employee-detail-activity-wrap{
  max-height:430px;
  overflow:auto;
}

#employeeDetailMsg{
  min-height:20px;
}

@media (max-width: 1024px){
  .employee-panel-card-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .employee-activity-directory-list{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .employee-activity-filter-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .employee-create-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .employee-detail-stat-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .employee-detail-layout{
    grid-template-columns:1fr;
  }

  #view-warranties .warranty-pager-controls{
    width: 100%;
    justify-content: flex-start;
  }

  #view-warranties .warranty-pager-pages{
    justify-content: flex-start;
  }
}

@media (max-width: 760px){
  .employee-panel-card-grid{
    grid-template-columns:1fr;
  }

  .employee-activity-directory-list,
  .employee-activity-filter-grid{
    grid-template-columns:1fr;
  }

  .employee-activity-detail-head{
    flex-direction:column;
  }

  .employee-activity-person-card,
  .employee-activity-filter-btn{
    min-height:auto;
  }

  .employee-request-filter-btn{
    min-width:0;
    flex:1 1 0;
  }

  .employee-panel-card-btn{
    min-height:152px;
    padding:16px 18px;
  }

  .employee-panel-card-title{
    font-size:19px;
    max-width:none;
  }

  .employee-panel-card-sub{
    max-width:none;
  }

  .employee-create-grid{
    grid-template-columns:1fr;
  }

  .employee-detail-modal-card{
    width:min(98vw, 98vw);
    padding:16px;
  }

  .employee-detail-head{
    flex-direction:column;
  }

  .employee-detail-stat-grid,
  .employee-detail-form-grid{
    grid-template-columns:1fr;
  }

  .employee-detail-field.span-2{
    grid-column:auto;
  }

  .employee-detail-inline-row{
    grid-template-columns:1fr;
  }

  .employee-detail-head-actions,
  .employee-detail-save-actions{
    width:100%;
  }

  .employee-detail-head-actions .btn,
  .employee-detail-inline-row .btn,
  .employee-detail-save-actions .btn{
    width:100%;
  }

  #view-warranties .warranty-toolbar-view-cluster{
    width: 100%;
    justify-content: space-between;
  }

  #view-warranties .warranty-toolbar-view-select{
    flex: 1 1 auto;
    min-width: 0;
  }

  #view-warranties .warranty-pager-shell{
    align-items: stretch;
  }

  #view-warranties .warranty-pager-summary,
  #view-warranties .warranty-pager-controls{
    width: 100%;
  }
}
/* end warranty pagination refinement */

/* module registry + admin warranty */
.module-catalog-grid{
  display:grid;
  grid-template-columns:minmax(360px, 1.1fr) minmax(320px, .9fr);
  gap:16px;
}
.module-form-grid,
.admin-warranty-form-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}
.module-field,
.admin-warranty-field{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.module-field span,
.admin-warranty-field span{
  font-size:13px;
  font-weight:700;
  color:#355160;
}
.module-field.span-2,
.admin-warranty-field.span-2{
  grid-column:1 / -1;
}
.module-inline-form,
.admin-inline-form{
  display:flex;
  gap:10px;
  align-items:center;
}
.module-inline-form .input,
.admin-inline-form .input{
  flex:1;
}
.module-status-card{
  border:1px solid rgba(14,106,120,.12);
  border-radius:18px;
  padding:14px 16px;
  background:linear-gradient(180deg, #f8fcfe 0%, #eef7fb 100%);
  display:flex;
  flex-direction:column;
  gap:6px;
}
.module-status-card span{
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#537082;
  font-weight:800;
}
.module-status-card strong{
  font-size:18px;
  color:#102534;
}
.module-status-card small{
  color:#5f7887;
  line-height:1.45;
}
.module-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.module-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  background:#f0f8fb;
  border:1px solid #d4e8ef;
  color:#12384c;
}
.module-chip strong{
  font-size:13px;
  font-weight:700;
}
.module-chip button{
  border:none;
  background:transparent;
  color:#6f8794;
  font-size:18px;
  cursor:pointer;
  line-height:1;
}
.module-chip button:hover{
  color:#12384c;
}
.module-action-row,
.admin-warranty-action-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.module-registry-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:120px;
  padding:9px 14px;
  border-radius:999px;
  background:#eff7fb;
  color:#0f6675;
  font-weight:800;
  letter-spacing:.04em;
}
.module-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:14px;
}
.module-card{
  border:1px solid #e3edf3;
  border-radius:20px;
  padding:16px;
  background:linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow:0 10px 26px rgba(13, 52, 64, .06);
}
.module-card.is-editing{
  border-color:#bad8e6;
  box-shadow:0 16px 34px rgba(13, 52, 64, .10);
}
.module-card-head{
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content:space-between;
}
.module-card-meta{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
}
.module-card-kicker{
  font-size:11px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:#5f7c8d;
  font-weight:800;
}
.module-card h4{
  margin:6px 0 0;
  font-size:20px;
  color:#102534;
}
.module-card-count{
  font-size:12px;
  font-weight:800;
  color:#0f6675;
  background:#eff7fb;
  border-radius:999px;
  padding:7px 10px;
  white-space:nowrap;
}
.module-card-action-btn{
  min-width:88px;
  justify-content:center;
  padding:9px 14px;
}
.module-card-edit-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
.module-card-edit-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin-top:14px;
}
.module-card-field{
  display:grid;
  gap:8px;
}
.module-card-field span{
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#537082;
  font-weight:800;
}
.module-card-field-span-2{
  grid-column:span 2;
}
.module-card-edit-inline{
  display:flex;
  gap:8px;
  align-items:center;
}
.module-card-edit-inline .input{
  min-width:0;
}
.module-colour-edit-list{
  display:grid;
  gap:10px;
  margin-top:14px;
}
.module-colour-edit-item{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:16px;
  background:#f5f9fb;
  border:1px solid #d9e8ef;
}
.module-colour-edit-input{
  flex:1 1 auto;
  min-width:0;
  min-height:42px;
}
.module-colour-edit-item button{
  border:none;
  background:transparent;
  color:#6f8794;
  font-size:20px;
  cursor:pointer;
  line-height:1;
  padding:4px;
}
.module-colour-edit-item button:hover{
  color:#12384c;
}
.module-card-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}
.module-card-chip{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  background:#f5f9fb;
  border:1px solid #ddeaf0;
  color:#355160;
  font-size:12px;
  font-weight:700;
}
.module-card-chip.is-empty,
.module-empty-state{
  color:#6e8592;
}
.module-empty-state{
  padding:28px 18px;
  border:1px dashed #d3e3ea;
  border-radius:18px;
  background:#fbfdfe;
  text-align:center;
}
.module-empty-inline{
  width:100%;
  padding:14px 16px;
  text-align:left;
}
.admin-warranty-panel{
  margin-bottom:16px;
}
.admin-warranty-form-grid select.input{
  min-height:46px;
}
.admin-warranty-form-grid .hint{
  min-height:18px;
  margin:0;
}

#view-warranties #warrantyTable th:nth-child(1),
#view-warranties #warrantyTable td:nth-child(1),
#view-warranties #warrantyPartnerTable th:nth-child(1),
#view-warranties #warrantyPartnerTable td:nth-child(1){
  min-width:150px;
}
#view-warranties #warrantyTable th:nth-child(2),
#view-warranties #warrantyTable td:nth-child(2),
#view-warranties #warrantyPartnerTable th:nth-child(2),
#view-warranties #warrantyPartnerTable td:nth-child(2){
  min-width:150px;
}
#view-warranties #warrantyTable th:nth-child(3),
#view-warranties #warrantyTable td:nth-child(3),
#view-warranties #warrantyPartnerTable th:nth-child(3),
#view-warranties #warrantyPartnerTable td:nth-child(3),
#view-warranties #warrantyTable th:nth-child(4),
#view-warranties #warrantyTable td:nth-child(4),
#view-warranties #warrantyPartnerTable th:nth-child(4),
#view-warranties #warrantyPartnerTable td:nth-child(4){
  min-width:130px;
}
#view-warranties #warrantyTable th:nth-child(5),
#view-warranties #warrantyTable td:nth-child(5),
#view-warranties #warrantyPartnerTable th:nth-child(5),
#view-warranties #warrantyPartnerTable td:nth-child(5){
  min-width:140px;
}
#view-warranties #warrantyTable th:nth-child(6),
#view-warranties #warrantyTable td:nth-child(6),
#view-warranties #warrantyPartnerTable th:nth-child(6),
#view-warranties #warrantyPartnerTable td:nth-child(6){
  min-width:120px;
}
#view-warranties #warrantyTable th:nth-child(7),
#view-warranties #warrantyTable td:nth-child(7),
#view-warranties #warrantyPartnerTable th:nth-child(7),
#view-warranties #warrantyPartnerTable td:nth-child(7){
  min-width:180px;
}
#view-warranties #warrantyTable th:nth-child(8),
#view-warranties #warrantyTable td:nth-child(8),
#view-warranties #warrantyPartnerTable th:nth-child(8),
#view-warranties #warrantyPartnerTable td:nth-child(8){
  min-width:140px;
}
#view-warranties #warrantyTable th:nth-child(9),
#view-warranties #warrantyTable td:nth-child(9),
#view-warranties #warrantyPartnerTable th:nth-child(11),
#view-warranties #warrantyPartnerTable td:nth-child(11){
  min-width:170px;
}
#view-warranties #warrantyTable th:nth-child(10),
#view-warranties #warrantyTable td:nth-child(10),
#view-warranties #warrantyPartnerTable th:nth-child(9),
#view-warranties #warrantyPartnerTable td:nth-child(9){
  min-width:170px;
}
#view-warranties #warrantyTable th:nth-child(11),
#view-warranties #warrantyTable td:nth-child(11),
#view-warranties #warrantyPartnerTable th:nth-child(10),
#view-warranties #warrantyPartnerTable td:nth-child(10){
  min-width:170px;
}

@media (max-width: 1180px){
  .module-catalog-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 820px){
  .module-form-grid,
  .admin-warranty-form-grid{
    grid-template-columns:1fr;
  }
  .module-field.span-2,
  .admin-warranty-field.span-2{
    grid-column:auto;
  }
  .module-inline-form,
  .admin-inline-form,
  .module-action-row,
  .admin-warranty-action-row{
    flex-direction:column;
    align-items:stretch;
  }
  .module-card-meta{
    width:100%;
    align-items:stretch;
  }
  .module-card-edit-actions{
    justify-content:stretch;
  }
  .module-card-edit-grid{
    grid-template-columns:1fr;
  }
  .module-card-field-span-2{
    grid-column:span 1;
  }
  .module-card-edit-inline{
    flex-direction:column;
    align-items:stretch;
  }
  .module-colour-edit-item{
    align-items:stretch;
  }
}

/* Admin mobile navigation + tighter responsive shell */
body.sidebar-locked{
  overflow:hidden;
}

.topbar > div{
  min-width:0;
}

.topbar-actions{
  min-width:0;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.mobile-nav-toggle{
  display:none;
  border-color:rgba(255,255,255,.18);
  background:rgba(255,255,255,.14);
  color:#fff;
  backdrop-filter:blur(6px);
}

.mobile-nav-toggle:hover{
  background:rgba(255,255,255,.22);
}

.sidebar-backdrop{
  position:fixed;
  inset:0;
  border:0;
  padding:0;
  background:rgba(2, 6, 23, .56);
  backdrop-filter:blur(3px);
  z-index:70;
}

@media (max-width: 1100px){
  .mobile-nav-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:92px;
  }

  .app-shell{
    grid-template-columns:1fr;
  }

  .sidebar{
    order:initial;
    position:fixed;
    top:14px;
    bottom:14px;
    left:14px;
    width:min(320px, calc(100vw - 28px));
    max-width:calc(100vw - 28px);
    overflow-y:auto;
    z-index:80;
    transform:translateX(calc(-100% - 24px));
    opacity:0;
    pointer-events:none;
    transition:transform .24s ease, opacity .24s ease;
  }

  .app-shell.sidebar-open .sidebar{
    transform:translateX(0);
    opacity:1;
    pointer-events:auto;
  }

  .main{
    order:initial;
    width:100%;
  }
}

@media (max-width: 760px){
  .topbar-actions{
    width:100%;
    justify-content:stretch;
  }

  .topbar-actions .btn{
    flex:1 1 140px;
  }
}

@media (min-width: 1101px){
  .sidebar-backdrop{
    display:none !important;
  }
}


.admin-reset-modal-card{
  width:min(620px, 92vw);
}

.admin-reset-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}

.admin-reset-head .muted{
  margin:6px 0 0;
}

.admin-reset-form{
  grid-template-columns:1fr;
  margin-top:0;
}

.admin-reset-row{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}

.admin-reset-actions{
  grid-column:1 / -1;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.admin-reset-stage-note{
  grid-column:1 / -1;
  font-size:13px;
  color:var(--muted);
}

.admin-reset-dev-hint{
  grid-column:1 / -1;
  margin:0;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(15, 102, 117, .08);
  color:#0f6675;
}

.admin-reset-hint{
  margin-top:12px;
}

@media (max-width: 640px){
  .admin-reset-head{
    flex-direction:column;
  }

  .admin-reset-row{
    grid-template-columns:1fr;
  }
}

/* GOAT ADMIN LOGIN OTP FLOW START */
.admin-login-form{
  grid-template-columns:1fr 1fr;
}

.admin-login-banner{
  grid-column:1 / -1;
  display:grid;
  gap:10px;
  padding:16px 18px;
  border-radius:18px;
  border:1px solid rgba(14,106,120,.16);
  background:linear-gradient(135deg, rgba(14,106,120,.08) 0%, rgba(255,255,255,.98) 100%);
}

.admin-login-pill{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(14,106,120,.12);
  color:var(--primary);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.admin-login-banner p{
  margin:0;
  color:#415162;
  line-height:1.6;
}

.admin-login-credentials{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.admin-login-otp-panel{
  grid-column:1 / -1;
  display:grid;
  gap:14px;
  padding:18px;
  border-radius:18px;
  border:1px solid rgba(14,106,120,.18);
  background:linear-gradient(135deg, rgba(14,106,120,.05) 0%, rgba(239,248,250,.88) 100%);
}

.admin-login-otp-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}

.admin-login-step-tag{
  margin:0 0 4px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--primary);
}

.admin-login-otp-title{
  font-size:16px;
  color:#102131;
}

.admin-login-otp-timer{
  padding:8px 12px;
  border-radius:999px;
  background:rgba(15,59,71,.08);
  color:#274354;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}

.admin-login-otp-note{
  font-size:13px;
  color:#4b5d70;
  line-height:1.5;
}

.admin-login-otp-field{
  max-width:340px;
}

.admin-login-dev-hint{
  margin:0;
  padding:11px 13px;
  border-radius:12px;
  background:rgba(14,106,120,.10);
  color:#0f6675;
}

.admin-login-otp-actions{
  justify-content:flex-end;
}

@media (max-width: 760px){
  .admin-login-credentials{
    grid-template-columns:1fr;
  }

  .admin-login-otp-head{
    flex-direction:column;
  }

  .admin-login-otp-field{
    max-width:none;
  }
}
/* GOAT ADMIN LOGIN OTP FLOW END */


/* GOAT WARRANTY QR GENERATOR START */
.warranty-qr-modal-card {
  max-width: 860px;
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}

.warranty-qr-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.warranty-qr-head h3,
.warranty-qr-history h4 {
  margin: 0;
}

.warranty-qr-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(240px, 320px);
  gap: 18px 24px;
  align-items: end;
}

.warranty-qr-field {
  min-width: 0;
}

.warranty-qr-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.warranty-qr-actions .btn {
  min-width: 170px;
  min-height: 48px;
  justify-content: center;
  padding-left: 22px;
  padding-right: 22px;
  white-space: nowrap;
}

.warranty-qr-downloads,
.warranty-qr-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.warranty-qr-downloads .btn,
.warranty-qr-list-actions .btn {
  min-width: 92px;
  justify-content: center;
  white-space: nowrap;
}

.warranty-qr-preview {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  margin-top: 18px;
  border: 1px solid rgba(12, 113, 125, 0.22);
  border-radius: 8px;
  background: #f8fbfc;
}

.warranty-qr-image-wrap {
  display: grid;
  place-items: center;
  width: 220px;
  aspect-ratio: 1;
  background: #ffffff;
  border: 1px solid #d9e5e8;
  border-radius: 8px;
}

.warranty-qr-image-wrap img {
  width: 190px;
  height: 190px;
  object-fit: contain;
}

.warranty-qr-result,
.warranty-qr-list-main {
  min-width: 0;
}

.warranty-qr-result strong,
.warranty-qr-list-main span {
  display: block;
  overflow-wrap: anywhere;
}

.warranty-qr-result strong {
  margin: 4px 0 14px;
}

.warranty-qr-msg.success {
  color: #0b7b47;
}

.warranty-qr-msg.error,
.warranty-qr-empty.error {
  color: #b42318;
}

.warranty-qr-history {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e5edf0;
}

.warranty-qr-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.warranty-qr-list {
  display: grid;
  gap: 10px;
}

.warranty-qr-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.warranty-qr-list-main strong {
  display: block;
  margin-bottom: 4px;
}

.warranty-qr-list-main small,
.warranty-qr-empty {
  color: #6b7280;
}

.warranty-qr-list-actions .danger {
  color: #b42318;
  border-color: #f3c7c1;
  background: #fff7f5;
}

@media (max-width: 820px) {
  .warranty-qr-grid,
  .warranty-qr-preview,
  .warranty-qr-list-item {
    grid-template-columns: 1fr;
  }

  .warranty-qr-actions .btn,
  .warranty-qr-downloads .btn,
  .warranty-qr-list-actions .btn {
    width: 100%;
  }

  .warranty-qr-history-head {
    align-items: stretch;
    flex-direction: column;
  }

  .warranty-qr-image-wrap {
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
  }
}
/* GOAT WARRANTY QR GENERATOR END */


/* GOAT STOCK INTELLIGENCE START */
.stock-intel-panel { overflow: visible; }
.stock-intel-head, .stock-intel-tools, .stock-record-toolbar, .stock-subpage-head, .stock-subpage-actions, .stock-inline-entry { display: flex; align-items: center; gap: 12px; }
.stock-intel-head, .stock-subpage-head { justify-content: space-between; margin-bottom: 18px; }
.stock-intel-tools { flex-wrap: wrap; justify-content: flex-end; }
.stock-intel-summary { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stock-intel-summary > div, .stock-chart-card, .stock-form, .stock-master-setup, .stock-channel-box, .stock-saved-masters { border: 1px solid #e1ecef; border-radius: 8px; background: #ffffff; }
.stock-intel-summary > div, .stock-chart-card, .stock-form, .stock-master-setup, .stock-channel-box, .stock-saved-masters { padding: 16px; }
.stock-intel-summary span { display: block; color: #6b7280; font-size: 13px; }
.stock-intel-summary strong { display: block; margin-top: 4px; font-size: 24px; }
.stock-intel-layout { display: grid; grid-template-columns: minmax(360px, 0.95fr) minmax(460px, 1.05fr); gap: 18px; align-items: start; }
.stock-chart-grid, .stock-master-list, .stock-master-channels { display: grid; gap: 14px; }
.stock-chart-card h3, .stock-subpage-head h3, .stock-channel-box h4, .stock-saved-masters h4 { margin: 0 0 10px; font-size: 20px; }
.stock-chart-body { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: center; margin-top: 12px; }
.stock-pie { width: 160px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(#e5e7eb 0 100%); box-shadow: inset 0 0 0 18px #ffffff, 0 0 0 1px #d8e6ea; cursor: pointer; }
.stock-legend { display: grid; gap: 8px; }
.stock-legend button { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; border: 0; background: transparent; color: #111827; text-align: left; cursor: pointer; }
.stock-dot { width: 12px; height: 12px; border-radius: 50%; }
.stock-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stock-action-card { display: grid; gap: 8px; min-height: 118px; padding: 16px; border: 1px solid #dbe7eb; border-radius: 8px; background: #f8fcfd; color: #111827; text-align: left; cursor: pointer; }
.stock-action-card:hover { border-color: #0f766e; box-shadow: 0 8px 18px rgba(15, 118, 110, 0.12); }
.stock-action-card strong { font-size: 18px; }
.stock-action-card span, .stock-master-row small { color: #6b7280; line-height: 1.35; }
.stock-form, .stock-master-setup { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid label, .form-grid label span { display: grid; gap: 6px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.stock-master-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.stock-master-grid .btn, .stock-form > .btn { min-height: 48px; }
.stock-colour-chip-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 32px; }
.stock-colour-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #d7e5e9; border-radius: 999px; background: #f8fcfd; }
.stock-colour-chip button { border: 0; background: transparent; cursor: pointer; font-weight: 800; }
.stock-master-channels { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.stock-inline-entry { align-items: stretch; }
.stock-inline-entry .input { flex: 1; min-width: 0; }
.stock-master-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid #e5edf0; border-radius: 8px; background: #f8fcfd; }
.stock-master-row strong, .stock-master-row span { display: block; overflow-wrap: anywhere; }
.stock-master-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stock-master-actions .btn { min-width: 72px; min-height: 38px; padding: 8px 12px; }
.stock-master-actions .danger { color: #b42318; border-color: #f3c7c1; background: #fff7f5; }
.stock-record-toolbar { justify-content: space-between; flex-wrap: wrap; margin: 16px 0 10px; }
.stock-table-wrap { max-height: 420px; overflow: auto; }
.stock-register-note { margin: 0 0 12px; }
.stock-flow-note { padding: 12px 14px; border: 1px solid #cfe5ea; border-radius: 8px; background: #f4fbfd; color: #334155; }
.stock-report-summary { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stock-report-summary > div { padding: 14px; border: 1px solid #e1ecef; border-radius: 8px; background: #f8fcfd; }
.stock-report-summary span { display: block; color: #6b7280; font-size: 13px; }
.stock-report-summary strong { display: block; margin-top: 4px; font-size: 22px; }
.stock-report-menu { display: grid; gap: 12px; max-width: 760px; }
.stock-report-menu-btn { display: grid; grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr); gap: 14px; align-items: center; min-height: 76px; padding: 16px; border: 1px solid #dbe7eb; border-radius: 8px; background: #f8fcfd; color: #111827; text-align: left; cursor: pointer; }
.stock-report-menu-btn:hover { border-color: #0f766e; box-shadow: 0 8px 18px rgba(15, 118, 110, 0.12); }
.stock-report-menu-btn strong { font-size: 18px; }
.stock-report-menu-btn span { color: #6b7280; line-height: 1.35; }
.stock-report-visual { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; margin-bottom: 16px; padding: 16px; border: 1px solid #e1ecef; border-radius: 8px; background: #f8fcfd; }
.stock-report-pie { width: 150px; }
@media (max-width: 1180px) { .stock-intel-layout, .stock-chart-body, .stock-action-grid, .stock-master-channels { grid-template-columns: 1fr; } .stock-intel-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .stock-intel-head, .stock-subpage-head, .stock-record-toolbar, .stock-inline-entry { align-items: stretch; flex-direction: column; } .stock-subpage-actions { width: 100%; } .stock-subpage-actions .btn { flex: 1; } .stock-intel-tools, .stock-intel-tools .btn, .stock-intel-tools .input, .stock-record-toolbar .btn, .stock-record-toolbar .input { width: 100%; } .stock-intel-summary, .form-grid, .stock-master-grid, .stock-master-row, .stock-report-summary, .stock-report-menu-btn, .stock-report-visual { grid-template-columns: 1fr; } }
/* GOAT STOCK INTELLIGENCE END */


/* Stock intelligence record management */
.stock-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.stock-row-actions .btn {
  min-width: 74px;
  padding: 10px 14px;
  border-radius: 10px;
}
.stock-row-actions .btn.danger,
.stock-confirm-card .btn.danger {
  color: #b42318;
  background: #fff7f5;
  border-color: #fecaca;
}
.stock-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.48);
  backdrop-filter: blur(4px);
}
.stock-confirm-overlay.hidden {
  display: none;
}
.stock-confirm-card {
  width: min(460px, 100%);
  padding: 28px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.26);
  border: 1px solid #dbe8ec;
}
.stock-confirm-card h3 {
  margin: 0 0 10px;
  color: #111827;
}
.stock-confirm-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}
.stock-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}


/* Stock intelligence clickable KPI cards */
.stock-intel-summary .stock-summary-action {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.stock-intel-summary .stock-summary-action:hover,
.stock-intel-summary .stock-summary-action:focus-visible {
  transform: translateY(-2px);
  border-color: #0f766e;
  background: #f4fbfb;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.14);
  outline: none;
}
.stock-intel-summary .stock-summary-action:active {
  transform: translateY(0);
}


/* Stock intelligence edit record modal */
.stock-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.52);
  backdrop-filter: blur(5px);
}
.stock-edit-overlay.hidden {
  display: none;
}
.stock-edit-card {
  width: min(820px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid #dbe8ec;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.28);
}
.stock-edit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.stock-edit-head h3 {
  margin: 0;
  color: #111827;
}
.stock-edit-head p {
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.45;
}
.stock-edit-close {
  min-width: 96px;
  padding: 12px 18px;
  border: 1px solid #dbe3ea;
  border-radius: 14px;
  background: #fff;
  color: #111827;
  font-weight: 800;
  cursor: pointer;
}
.stock-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.stock-edit-grid label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 700;
}
.stock-edit-grid input,
.stock-edit-grid select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #dbe3ea;
  border-radius: 14px;
  background: #fff;
  color: #111827;
  font: inherit;
}
.stock-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
.stock-edit-actions .btn {
  min-width: 140px;
}
@media (max-width: 720px) {
  .stock-edit-grid {
    grid-template-columns: 1fr;
  }
  .stock-edit-head,
  .stock-edit-actions {
    flex-direction: column;
  }
  .stock-edit-close,
  .stock-edit-actions .btn {
    width: 100%;
  }
}


/* Inline confirmation inside stock edit modal */
.stock-edit-inline-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #b9dfe6;
  border-radius: 16px;
  background: #f2fbfd;
}
.stock-edit-inline-confirm.hidden {
  display: none;
}
.stock-edit-inline-confirm strong,
.stock-edit-inline-confirm span {
  display: block;
}
.stock-edit-inline-confirm strong {
  color: #111827;
  font-size: 18px;
}
.stock-edit-inline-confirm span {
  margin-top: 4px;
  color: #64748b;
}
.stock-edit-confirm-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.stock-edit-confirm-actions .btn {
  min-width: 96px;
}
@media (max-width: 720px) {
  .stock-edit-inline-confirm,
  .stock-edit-confirm-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Partner directory toolbar: use the panel width, not leftover header space. */
.partner-profile-directory > .panel-head {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}
.partner-profile-directory .partner-profile-toolbar {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.partner-profile-directory .partner-toolbar-row-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
}
.partner-profile-directory .partner-toolbar-row-bottom {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.partner-profile-directory .partner-toolbar-row > .partner-toolbar-btn {
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 78px;
  box-sizing: border-box;
  white-space: normal;
}
.partner-profile-directory .partner-toolbar-copy {
  overflow-wrap: anywhere;
}
.partner-profile-directory .partner-search-wrap {
  box-sizing: border-box;
}
.partner-profile-directory .partner-search-wrap .input {
  width: 100%;
  min-width: 0;
  flex: 1 1 0;
}
@media (max-width: 640px) {
  .partner-profile-directory .partner-toolbar-row-top {
    grid-template-columns: minmax(0, 1fr);
  }
  .partner-profile-directory .partner-search-wrap {
    min-height: 60px;
  }
}
