/* =====================================================
   BSS — Brahmins Subsidy Store — bss-style.css v1.0
   ===================================================== */

#bss-wrap * { box-sizing: border-box; }

#bss-wrap {
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  color: #111;
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 6px 40px;
}

/* ── Cards ── */
.bss-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 24px 22px;
  border: 1px solid #ececec;
  margin-bottom: 24px;
}

/* ── Headings ── */
.bss-title {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 4px;
  color: #7a0f0f;
  text-transform: uppercase;
}
.bss-title-sub { font-size: 19px; margin-top: 0; }
.bss-subtitle {
  text-align: center;
  font-size: 14px;
  color: #555;
  font-weight: 600;
  margin-bottom: 22px;
}
.bss-section-title {
  margin: 30px 0 12px;
  font-size: 21px;
  font-weight: 800;
  color: #7a0f0f;
  border-left: 6px solid #7a0f0f;
  padding-left: 10px;
}

/* ── Form ── */
.bss-form-group { margin-bottom: 15px; }
.bss-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #111;
}
#bss-wrap input[type="text"],
#bss-wrap input[type="tel"],
#bss-wrap input[type="password"],
#bss-wrap select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #cfd5e2;
  padding: 11px 13px;
  font-size: 15px;
  outline: none;
  background: #fff;
  color: #111;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#bss-wrap input:focus,
#bss-wrap select:focus {
  border-color: #8b1e1e;
  box-shadow: 0 0 0 3px rgba(139,30,30,0.10);
}
.bss-locked {
  background: #f4f5f8 !important;
  cursor: not-allowed !important;
  color: #999 !important;
}
.bss-row {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 10px;
}
.bss-helper { font-size: 12px; color: #666; margin-top: 5px; line-height: 1.4; }

/* ── Buttons ── */
.bss-btn {
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, opacity 0.15s;
  width: 100%;
  display: inline-block;
}
.bss-btn:hover { transform: translateY(-1px); opacity: 0.93; }
.bss-btn-dark  { background: #1a1a1a; color: #fff; }
.bss-btn-red   { background: #8b1e1e; color: #fff; }
.bss-btn-green { background: linear-gradient(90deg,#0f7b2d,#1c9c43); color: #fff; letter-spacing: 0.3px; }
.bss-btn-full  { margin-top: 8px; font-size: 16px; }
.bss-btn-cancel  { background: #eaeef5; color: #111; }
.bss-btn-danger  { background: #c51616; color: #fff; }
.bss-btn-logout  {
  background: #c51616;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.bss-btn-logout:hover { opacity: 0.85; }

/* ── Status messages ── */
.bss-status { font-size: 13px; font-weight: 700; margin-top: 6px; min-height: 18px; }
.bss-success { color: #0f7b2d; }
.bss-error   { color: #c51616; }
.bss-warning { color: #9a6700; }

/* ── Count bar ── */
.bss-count-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.bss-count-box {
  background: #fff7e6;
  border: 1px solid #f1d59f;
  color: #7a4c00;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 15px;
}

/* ── Summary grid ── */
.bss-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 10px;
}
.bss-summary-box {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #ececec;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
  padding: 14px;
}
.bss-summary-box h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #7a0f0f;
}

/* ── Tables ── */
.bss-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #ebedf3;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
  -webkit-overflow-scrolling: touch;
}
#bss-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}
#bss-wrap th, #bss-wrap td {
  padding: 11px 10px;
  border-bottom: 1px solid #ececec;
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
  white-space: nowrap;
  word-break: normal;
}
#bss-wrap th {
  background: #faf3f3;
  color: #5f0f0f;
  font-size: 13px;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 2;
}
#bss-wrap tr:last-child td { border-bottom: none; }
#bss-wrap tr:hover td { background: #fdf8f8; }
.bss-no-data { text-align: center !important; color: #888; font-weight: 700; white-space: normal !important; }
.bss-mini-table { min-width: auto !important; }

/* ── Status badges ── */
.bss-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.bss-badge-pending  { background: #fff3cd; color: #856404; }
.bss-badge-approved { background: #d4edda; color: #155724; }

/* ── Admin trigger ── */
.bss-admin-trigger { text-align: right; margin-top: 18px; }
.bss-btn-admin-link {
  background: none;
  border: 1px solid #cfd5e2;
  color: #555;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.bss-btn-admin-link:hover { background: #f4f5f8; }

/* ── Admin login box ── */
.bss-admin-login-box { max-width: 380px; margin: 14px auto 0; }
.bss-admin-card { background: #fff8f8; border: 1px solid #f0d0d0; }
.bss-admin-login-title {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: #7a0f0f;
  margin-bottom: 16px;
}

/* ── Admin bar ── */
.bss-admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #7a0f0f, #a31515);
  color: #fff;
  border-radius: 14px;
  padding: 14px 20px;
  margin-top: 18px;
  margin-bottom: 0;
  flex-wrap: wrap;
  gap: 10px;
}
.bss-admin-bar-title { font-size: 16px; font-weight: 800; letter-spacing: 0.3px; }

/* ── Admin controls ── */
.bss-admin-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.bss-filter-select {
  border-radius: 8px !important;
  border: 1px solid #cfd5e2 !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  width: auto !important;
  min-width: 160px;
  background: #fff !important;
  color: #111 !important;
}
.bss-admin-count-badge {
  background: #fff3cd;
  color: #7a4c00;
  font-weight: 800;
  font-size: 13px;
  border-radius: 999px;
  padding: 5px 14px;
  border: 1px solid #f1d59f;
}
.bss-auto-refresh-note { font-size: 12px; color: #888; font-weight: 700; }

/* ── Admin action buttons ── */
.bss-act-btn {
  border: none;
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  margin: 2px 2px;
  display: inline-block;
  white-space: nowrap;
}
.bss-act-btn:hover { opacity: 0.80; }
.bss-act-approve { background: #0f7b2d; color: #fff; }
.bss-act-edit    { background: #0d6efd; color: #fff; }
.bss-act-delete  { background: #c51616; color: #fff; }
.bss-act-approved-tag { color: #155724; font-weight: 800; font-size: 12px; }

/* ── Modal ── */
.bss-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.48);
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.bss-modal.bss-show { display: flex; }
.bss-modal-content {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 18px;
  padding: 24px 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.28);
  animation: bssPopIn 0.18s ease-out;
  text-align: center;
}
.bss-edit-modal-content { max-width: 620px; text-align: left; }
@keyframes bssPopIn {
  from { transform: scale(0.96); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.bss-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #111;
  margin-bottom: 8px;
}
.bss-modal-note { font-size: 14px; color: #555; margin-bottom: 14px; }
.bss-mobile-display {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 2px;
  margin: 16px 0 20px;
  word-break: break-word;
}
.bss-mobile-black { color: #111; }
.bss-mobile-red   { color: #d40000; }
.bss-mobile-green { color: #0c8a1d; }
.bss-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.bss-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Bulk action bar ── */
.bss-bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 12px;
}
.bss-bulk-count {
  font-weight: 800;
  font-size: 14px;
  color: #7a4c00;
  margin-right: 4px;
}
.bss-btn-bulk {
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.bss-btn-bulk:hover { opacity: 0.82; }
.bss-btn-bulk-approve { background: #0f7b2d; color: #fff; }
.bss-btn-bulk-delete  { background: #c51616; color: #fff; }
.bss-btn-bulk-clear   { background: #eaeef5; color: #333; }

/* ── Checkbox column ── */
.bss-cb-col {
  width: 36px !important;
  text-align: center !important;
  padding: 10px 6px !important;
}
#bss-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #7a0f0f;
  border-radius: 3px;
  vertical-align: middle;
}
#bss-admin-table tbody tr.bss-row-selected td {
  background: #fff5f5;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .bss-title { font-size: 22px; }
  .bss-row { grid-template-columns: 1fr; }
  .bss-summary-grid { grid-template-columns: 1fr; }
  .bss-mobile-display { font-size: 26px; letter-spacing: 1px; }
  .bss-modal-actions { grid-template-columns: 1fr; }
  .bss-edit-grid { grid-template-columns: 1fr; }
  .bss-admin-bar { flex-direction: column; align-items: flex-start; }
}
