/* Basic layout */
:root {
    --bg: #f6f8fa;
    --card: #fff;
    --muted: #6b7280;
    --primary: #146b9a;
    --accent: #1e5a6e;
  }
  * { box-sizing: border-box; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
  html,body { height:100%; margin:0; background:var(--bg); color:#222; }
  .container { max-width:1100px; margin:20px auto; padding:12px; }
  
  /* Topbar */
  .topbar { display:flex; align-items:center; justify-content:space-between; padding:10px 18px; background:var(--card); box-shadow:0 2px 6px rgba(10,20,30,0.04); border-bottom:1px solid #eee; }
  .brand { font-weight:700; color:var(--accent); }
  .nav { display:flex; gap:8px; margin-left:12px; }
  .nav-btn { background:transparent; border:0; padding:8px 12px; cursor:pointer; border-radius:6px; font-weight:600; color:#333; }
  .nav-btn:hover { background:#c4e8d2; }
  .user-controls { display:flex; gap:8px; align-items:center; }
  
  /* Page & panels */
  .page { margin-top:18px; }
  .card, .panel { background:var(--card); padding:12px; border-radius:8px; box-shadow:0 6px 14px rgba(20,30,40,0.03); margin-bottom:12px; }
  .summary-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:14px; }
  .card-value { font-size:1.2rem; font-weight:700; margin-top:6px; }
  .card-label { color:var(--muted); font-size:0.9rem; }
  
  /* Table */
  .table { width:100%; border-collapse:collapse; background:transparent; margin-top:8px; }
  .table thead th { text-align:left; padding:10px; font-weight:700; border-bottom:1px solid #eee; background:transparent; }
  .table tbody td { padding:10px; border-bottom:1px dashed #f3f4f6; font-size:0.95rem; }
  
  /* Forms */
  .form-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; align-items:end; }
  .form-inline { display:flex; gap:12px; align-items:center; }
  .form-actions { grid-column:1/-1; display:flex; gap:8px; }
  
  /* Buttons */
  button { cursor:pointer; border-radius:6px; padding:8px 12px; border:1px solid rgba(0,0,0,0.06); background:#fff; }
  button.primary { background:var(--primary); color:#fff; border:0; }
  button.secondary { background:#eef6fb; color:#0a4a66; border:0; }
  button.ghost { background:transparent; border:1px dashed #ddd; padding:6px 10px; }
  
  /* Modal */
  .modal { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,0.35); z-index:50; }
  .modal.hidden { display:none; }
  .modal-inner { background:#fff; padding:18px; border-radius:8px; width:520px; max-width:calc(100% - 32px); box-shadow:0 12px 40px rgba(0,0,0,0.12); }
  
  /* Footer */
  .footer { text-align:center; padding:12px 18px; color:#555; font-size:0.9rem; }
  
  /* Helpers */
  .status-pill { padding:6px 10px; border-radius:999px; display:inline-block; font-weight:600; }
  .status-owing { background:#ffe6e6; color:#9b1c1c; }
  .status-ok { background:#e6fff0; color:#0a6b3a; }
  .table-scroll { max-height:260px; overflow:auto; border:1px solid #eee; padding:8px; }
  
  /* small responsive */
  @media (max-width:900px) {
    .summary-grid { grid-template-columns:repeat(2,1fr); }
    .form-grid { grid-template-columns:1fr; }
    .nav { overflow:auto; white-space:nowrap; }
  }
  
  /* Page visibility control */
.page {
  display: none;          /* hide all pages by default */
  margin-top: 18px;
}

.page.active {
  display: block;         /* show active page */
}

.hidden {
  display: none !important;
}


#pending-payments-table ul {
  list-style: disc;
  font-size: 0.85rem;
}

#pending-payments-table li {
  margin-bottom: 4px;
}

#pending-payments-table li span {
  color: #146b9a;
  font-weight: 600;
}


.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-paid {
  background: #e6fff0;
  color: #0a6b3a;
}

.badge-partial {
  background: #fff7e6;
  color: #8a5a00;
}

.badge-awaiting {
  background: #fff4cc;
  color: #8a6d00;
}

.badge-unpaid {
  background: #ffe6e6;
  color: #9b1c1c;
}

.status-awaiting {
  background: #fff4cc;
  color: #8a6d00;
}
#service-charge-panel {
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
}

#service-charge-panel select,
#service-charge-panel input {
  min-width: 220px;
}
.dashboard-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  margin-bottom: 14px;
}

.alert-ok {
  background: #e6fff0;
  color: #0a6b3a;
}

.alert-pending {
  background: #fff7e6;
  color: #8a6d00;
}

.alert-owing {
  background: #ffe6e6;
  color: #9b1c1c;
}


/* ================================
   ADMIN MODULE TABS (SAFE)
   ================================ */

.tab-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #eee;
  margin-bottom: 12px;
}

.tab-btn, .tab-btn4 {
  background: transparent;
  border: 0;
  padding: 8px 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.tab-btn:hover, .tab-btn4:hover {
  color: var(--accent);
}

.tab-btn.active, .tab-btn4.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* IMPORTANT: NOT using .page or .hidden */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}






.tab-btn1 {
  background: transparent;
  border: 0;
  padding: 8px 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.tab-btn1:hover {
  color: var(--accent);
}

.tab-btn1.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* IMPORTANT: NOT using .page or .hidden */
.tab-content1 {
  display: none;
}

.tab-content1.active {
  display: block;
}


.badge-ok {
  background: #e6fff0;
  color: #0a6b3a;
}


.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.kpi-card {
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  border-left: 6px solid #2e7d32;
  color: #9b1c1c;
  font-weight: bold;
}

.kpi-card.danger {
  border-left-color: #c62828;
}

.kpi-title {
  font-size: 0.85rem;
  color: #666;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: bold;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.chart-card {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
}


.finsec-tab {
  display: none;
}

.finsec-tab.active {
  display: block;
}



/* Submit button states */
button.submit-disabled {
  background: #fee2e2;        /* light red */
  color: #991b1b;             /* dark red */
  cursor: not-allowed;
  opacity: 0.9;
}

button.submit-enabled {
  background: #16a34a;        /* green */
  color: #ffffff;
  cursor: pointer;
}










#download-compliance-report {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #ffffff;
  border: none;

  /* 🔹 SIZE CONTROL */
  width: 220px;                 /* adjust if needed: 200–240px */
  max-width: 100%;
  text-align: center;
  white-space: normal;          /* allow wrapping */
  line-height: 1.25;

  padding: 10px 14px;
  font-weight: 700;
  border-radius: 8px;

  box-shadow:
    0 6px 14px rgba(22, 163, 74, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

/* Hover = lift */
#download-compliance-report:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 22px rgba(22, 163, 74, 0.45),
    inset 0 -2px 0 rgba(0, 0, 0, 0.15);
  filter: brightness(1.05);
}

/* Active = press */
#download-compliance-report:active {
  transform: translateY(0);
  box-shadow:
    0 4px 10px rgba(22, 163, 74, 0.35),
    inset 0 2px 0 rgba(0, 0, 0, 0.2);
}

/* Focus */
#download-compliance-report:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(34, 197, 94, 0.4),
    0 8px 18px rgba(22, 163, 74, 0.4);
}



@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .nav {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 6px;
  }

  .nav-btn {
    
    font-size: 0.85rem;
    padding: 6px 10px;
  }

  .user-controls {
    justify-content: space-between;
  }
}


@media (max-width: 768px) {
  .summary-grid,
  .kpi-grid,
  .chart-grid {
    grid-template-columns: 1fr;
  }

  .card-value,
  .kpi-value {
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  .form-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .form-inline > div,
  .form-inline button {
    width: 100%;
  }
}


input,
select,
button {
  min-height: 40px;
  font-size: 0.95rem;
}


.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}


@media (max-width: 768px) {
  .table thead th,
  .table tbody td {
    padding: 8px 6px;
    font-size: 0.85rem;
  }
}


@media (max-width: 768px) {
  .container {
    margin: 8px auto;
    padding: 8px;
  }

  .panel,
  .card {
    padding: 10px;
  }

  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.1rem; }
}


@media (max-width: 768px) {
  .modal-inner {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
    overflow-y: auto;
  }
}


@media (max-width: 768px) {

  .form-actions {
    flex-direction: column;
  }
}


@media (max-width: 768px) {

  /* Nav + tabs stay compact */
  .nav-btn,
  .tab-btn,
  .tab-btn1 {
    width: auto;
    white-space: nowrap;
  }

  /* Action buttons go full width */
  .form-actions button,
  .panel-footer button,
  button.primary {
    width: 100%;
  }
}







.panel-footer > :nth-child(2) {
  white-space: nowrap;
}

.panel-footer > :last-child {
  margin-left: auto;
}

/*
@media (max-width: 768px) {
  .panel-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  } 

  .panel-footer input[type="file"] {
    width: 100%;
  }

  .panel-footer > :nth-child(2) {
    font-size: 1rem;
  }

  #submit-payments {
    width: 100%;
    font-size: 1rem;
    margin-bottom:15px
  }
}
*/

@media (max-width: 768px) {
  .panel-footer strong {
    display: inline-block;
    margin-right: 6px;
  }

  #pay-total {
    font-weight: 700;
    color: #146b9a;
  }
}


/*
@media (max-width: 600px) {
  .panel-footer {
    grid-template-columns: 1fr;
  }

  .footer-action {
    justify-self: stretch;
  }

  #submit-payments {
    width: 100%;
    font-size: 1rem;
    margin-bottom:15px
  }
}*/

.panel-footer {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  gap: 16px;
  margin-top: 12px;
}

/* Medium screens: 2 columns */
@media (max-width: 900px) {
  .panel-footer {
    grid-template-columns: 1fr 1fr;
  }

 
}

/* Small screens: 1 column */
@media (max-width: 600px) {
  .panel-footer {
    grid-template-columns: 1fr;
  }

  .panel-footer .footer-action {
    justify-self: stretch;
  }
}


.table-controls {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-group label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #374151;
}

.control-group select {
  min-width: 160px;
}

.control-action {
  justify-self: end;
}

/* Tablet */
@media (max-width: 900px) {
  .table-controls {
    grid-template-columns: 1fr 1fr;
  }

  .control-action {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

/* Small phones */
@media (max-width: 600px) {
  .table-controls {
    grid-template-columns: 1fr;
  }

  .control-group select {
    width: 100%;
  }

  .control-action {
    justify-self: stretch;
  }

  .control-action button {
    width: 100%;
  }
}


.panel-title {
  margin-bottom: 10px;
}

.levy-form {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: end;
  gap: 12px;
}

.levy-form .control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.levy-form select,
.levy-form input {
  min-width: 200px;
}

.levy-action {
  justify-self: end;
}

.panel-note {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-size: 0.85rem;
}


@media (max-width: 900px) {
  .levy-form {
    grid-template-columns: 1fr 1fr;
  }

  .levy-action {
    grid-column: 1 / -1;
    justify-self: center;
  }
}


@media (max-width: 600px) {
  .levy-form {
    grid-template-columns: 1fr;
  }

  .levy-form select,
  .levy-form input {
    width: 100%;
  }

  .levy-action {
    justify-self: stretch;
  }

  .levy-action button {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
  }
}

#member-charges-table{margin-bottom:10px}


@media (max-width: 768px) {
  #admin-module .tab-bar {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 6px;
  }

  #admin-module .tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.85rem;
    padding: 6px 10px;
  }
}



@media (max-width: 768px) {
  #admin-module .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  #admin-module .panel > div[style*="display:flex"] {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
}

#admin-module .table-wrapper,
#admin-module .panel table {
  
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  #admin-module .form-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  #admin-module .form-actions button,
  #admin-module .panel button.primary {
    width: 100%;
  }
}

@media (max-width: 768px) {
 

  #verify-plot-number {
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  #admin-module h1 { font-size: 1.25rem; }
  #admin-module h2 { font-size: 1.1rem; }
  #admin-module h3 { font-size: 1rem; }

  #admin-module .panel {
    padding: 10px;
  }
}


#admin-upload-tab .pay-mode {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

#admin-upload-tab .pay-mode label {
  display: flex;
  align-items: center;   /* 🔑 THIS fixes alignment */
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
}

#admin-upload-tab .pay-mode input[type="radio"] {
  margin: 0;             /* remove browser default offset */
}




@media (max-width: 600px) {
  #admin-upload-tab .pay-mode {
    flex-direction: column;
    gap: 10px;
  }
}

#admin-upload-tab .control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#admin-upload-tab .control-group label {
  font-weight: 600;
  font-size: 0.85rem;
  min-height: 1.2em;   /* 🔑 normalizes label height */
}






#admin-upload-tab .lookup-grid input[disabled] {
  background: #f9fafb;
  color: #555;
}

#admin-upload-tab #verify-plot-number {
  width: 100%;
  max-width: 120px;
}


#admin-upload-tab .pending-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e5e7eb;
}

#admin-upload-tab .pending-summary strong {
  font-size: 1.05rem;
  color: #146b9a;
}


#admin-upload-tab .payment-actions {
  margin-top: 16px;
}

#admin-upload-tab .payment-actions .form-actions {
  margin-top: 8px;
}


#admin-upload-tab h3 {
  margin-bottom: 12px;
}

#admin-upload-tab form > * + * {
  margin-top: 16px;
}


#admin-apply-dues-tab .control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#admin-apply-dues-tab .control-group label {
  font-weight: 600;
  font-size: 0.85rem;
  min-height: 1.2em;   /* 🔑 keeps labels aligned */
}

#admin-apply-dues-tab .apply-dues-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  #admin-apply-dues-tab .apply-dues-grid {
    grid-template-columns: 1fr;
  }
}

#admin-apply-dues-tab .apply-actions {
  grid-column: 1 / -1;     /* span full width */
  display: flex;
  gap: 10px;
}

@media (max-width: 768px) {
  #admin-apply-dues-tab .apply-actions {
    flex-direction: column;
  }

  #admin-apply-dues-tab .apply-actions button {
    width: 100%;
  }
}


#admin-member-management-tab .member-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

#admin-member-management-tab .member-note {
  font-size: 0.85rem;
  color: #6b7280;
  white-space: nowrap;
}


@media (max-width: 768px) {
  #admin-member-management-tab .member-filters {
    grid-template-columns: 1fr;
  }

  #admin-member-management-tab .member-note {
    text-align: center;
    white-space: normal;
  }
}

#admin-member-management-tab .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#admin-member-management-tab table {
  min-width: 720px; /* 🔑 prevents column collapse */
}


#admin-member-management-tab td:last-child {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  #admin-member-management-tab td:last-child button {
    width: 100%;
  }
}


@media (max-width: 768px) {
  #admin-member-management-tab .table thead th,
  #admin-member-management-tab .table tbody td {
    font-size: 0.85rem;
    padding: 8px 6px;
  }
}

  /* ================================
   PAYMENT INFO (Pay Dues)
   ================================ */

.payment-info {
  background: #f8fafc;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.payment-row {
  display: flex;
  gap: 12px;
  padding: 4px 0;
}

.payment-row .label {
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.payment-row .value {
  font-weight: 700;
  color: #0a4a66;
  text-align: right;
}

/* Mobile: stack neatly */
@media (max-width: 600px) {
  .payment-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .payment-row .value {
    text-align: left;
    font-size: 1rem;
  }
}

  
:root {
  --btn-primary: #2563eb;     /* Blue (Tailwind blue-600) */
  --btn-primary-hover: #1d4ed8;

  --btn-processing: #f59e0b;  /* Amber-500 */
  --btn-success: #16a34a;     /* Green-600 */

  --btn-disabled: #9ca3af;    /* Gray-400 */
}


button.primary {
  background-color: var(--btn-primary);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

button.primary:hover:not(:disabled) {
  background-color: var(--btn-primary-hover);
}

button.primary:disabled {
  cursor: not-allowed;
  opacity: 0.9;
}


button.is-processing {
  background-color: var(--btn-processing);
}

button.is-success {
  background-color: var(--btn-success);
}


.user-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  flex-shrink: 0; /* 🔥 prevents collapse */
}

/* Optional */
.user-name {
  color: #555;;
  font-size: 14px;
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav {
    width: 100%;
    order: 2;
  }

  .user-controls {
    width: 100%;
    justify-content: space-between;
    order: 1;
  }
}

/* ✅ ACTIVE TAB */
.nav-btn.active {
  background: #c4e8d2;      /* primary blue */
  color: #333;
  box-shadow: inset 0 -2px 0 #1e40af;
}

#admin-submit-payment:disabled {
  background: #385a92;        /* muted slate */
  color: #fff;             /* greyed text */
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}



/* ==============================
   STICKER MANAGEMENT
================================ */



.tab-content2 {
  display: none;
}

.tab-content2.active {
  display: block;
}

.tab-btn2.active {
  background: #1e88e5;
  color: white;
}


.tab-content4 {
  display: none;
}

.tab-content4.active {
  display: block;
}





/* ================================
   ISSUE STICKERS – SCOPED STYLES
================================ */

/* Panel */
#issue-stickers-tab {
  background: #ffffff;
  border-radius: 10px;
  padding: 16px;
}

/* Heading */
#issue-stickers-tab h3 {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
}

/* Form Grid */
#issue-stickers-tab .form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

/* Control Group */
#issue-stickers-tab .control-group {
  display: flex;
  flex-direction: column;
}

#issue-stickers-tab .control-group label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #444;
}

#issue-stickers-tab .control-group input,
#issue-stickers-tab .control-group select {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

#issue-stickers-tab .control-group input[disabled] {
  background: #f5f5f5;
  color: #666;
}

/* Issue Mode */
#issue-stickers-tab .issue-mode {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

#issue-stickers-tab .issue-mode label {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f7f9fc;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

/* Status */
#issue-stickers-tab .sticker-status {
  margin: 12px 0;
}

#issue-stickers-tab .status-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

#issue-stickers-tab .status-ok {
  background: #e6f7ed;
  color: #1e7e34;
}

#issue-stickers-tab .status-owing {
  background: #fdecea;
  color: #b02a37;
}

/* Preview */
#issue-stickers-tab .panel-note {
  background: #f4f6f9;
  border-left: 4px solid #1e88e5;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
  border-radius: 6px;
}

/* Actions */
#issue-stickers-tab .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

#issue-stickers-tab .form-actions button.primary {
  background: #1e88e5;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

#issue-stickers-tab .form-actions button.secondary {
  background: #e0e0e0;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

#issue-stickers-tab button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Hidden */
#issue-stickers-tab .hidden {
  display: none;
}

/* ================================
   MOBILE
================================ */
@media (max-width: 768px) {

  #issue-stickers-tab .form-grid {
    grid-template-columns: 1fr;
  }

  #issue-stickers-tab .form-actions {
    justify-content: stretch;
  }

  #issue-stickers-tab .form-actions button {
    width: 100%;
  }

  #issue-stickers-tab .issue-mode {
    flex-direction: column;
  }
}


/* ================================
   STICKER ALLOCATION – SCOPED
================================ */

/* Wrapper */
#sticker-allocation-tab {
  background: #ffffff;
  border-radius: 10px;
  padding: 16px;
}

/* Headings */
#sticker-allocation-tab h3 {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
}

#sticker-allocation-tab h4 {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

/* Inner Panels */
#sticker-allocation-tab > .panel {
  margin-bottom: 16px;
  padding: 16px;
  background: #fafafa;
  border-radius: 8px;
}

/* Form Grid */
#sticker-allocation-tab .form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

/* Control Group */
#sticker-allocation-tab .control-group {
  display: flex;
  flex-direction: column;
}

#sticker-allocation-tab .control-group label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #444;
}

#sticker-allocation-tab .control-group input,
#sticker-allocation-tab .control-group select,
#sticker-allocation-tab .control-group textarea {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

#sticker-allocation-tab .control-group textarea {
  resize: vertical;
}

#sticker-allocation-tab .control-group input[disabled] {
  background: #f2f2f2;
  color: #666;
}

/* Notes */
#sticker-allocation-tab .panel-note {
  background: #f4f6f9;
  border-left: 4px solid #6c757d;
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 6px;
  margin-top: 8px;
}

/* Actions */
#sticker-allocation-tab .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

#sticker-allocation-tab .form-actions button.primary {
  background: #198754;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

#sticker-allocation-tab .form-actions button.secondary {
  background: #e0e0e0;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

#sticker-allocation-tab button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Table Wrapper */
#sticker-allocation-tab .table-wrapper {
  overflow-x: auto;
}

/* Table */
#sticker-allocation-tab table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

#sticker-allocation-tab th,
#sticker-allocation-tab td {
  padding: 10px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
  white-space: nowrap;
}

#sticker-allocation-tab th {
  background: #f8f9fa;
  font-weight: 600;
}

/* Hidden */
#sticker-allocation-tab .hidden {
  display: none;
}

/* ================================
   MOBILE
================================ */
@media (max-width: 768px) {

  #sticker-allocation-tab .form-grid {
    grid-template-columns: 1fr;
  }

  #sticker-allocation-tab .form-actions {
    justify-content: stretch;
  }

  #sticker-allocation-tab .form-actions button {
    width: 100%;
  }

  #sticker-allocation-tab th,
  #sticker-allocation-tab td {
    font-size: 12px;
    padding: 8px;
  }
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.sticker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid #eee;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.sticker-item:hover {
  background: #f7f7f7;
}


/* ================================
   Member Sticker Picker (Scoped)
================================ */

#member-sticker-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 x 3 grid */
  gap: 12px;
  margin-top: 8px;
}

/* Sticker card */
#member-sticker-picker .sticker-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  height: 56px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;

  background: #ffffff;
  font-weight: 600;
  font-size: 14px;
  color: #333;

  cursor: pointer;
  user-select: none;

  transition: all 0.2s ease;
}

/* Hide native checkbox */
#member-sticker-picker .sticker-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Hover effect */
#member-sticker-picker .sticker-option:hover {
  border-color: #4f8ef7;
  background: #f5f9ff;
}

/* Selected state */
#member-sticker-picker .sticker-option:has(input:checked) {
  background: #4f8ef7;
  border-color: #4f8ef7;
  color: #ffffff;
}

/* Disabled appearance (optional) */
#member-sticker-picker .sticker-option.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Serial number text */
#member-sticker-picker .sticker-option span {
  z-index: 1;
}


.status-reserved {
  background: #fff3cd;
  color: #856404;
}

.status-allocated {
  background: #cce5ff;
  color: #004085;
}

.status-issued {
  background: #d4edda;
  color: #155724;
}

.status-void {
  background: #f8d7da;
  color: #721c24;
}


