/* ── TBSS Plugin Styles ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Order Form Wrap ─────────────────────────────────────────────────────── */
.tbss-wrap {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e5d9cc;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  overflow: hidden;
  padding: 20px;
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
}

.tbss-top-box {
  background: #fffdf9;
  border: 1px solid #eadfce;
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 18px;
}
.tbss-top-box h1 { margin: 0; font-size: 24px; color: #7a1d1d; font-weight: 800; line-height: 1.3; }
.tbss-sub1 { margin-top: 8px; font-size: 18px; font-weight: 700; color: #444; }
.tbss-sub2 { margin-top: 8px; font-size: 15px; font-weight: 700; color: #666; }
.tbss-sub3 { margin-top: 6px; font-size: 15px; font-weight: 700; color: #7a1d1d; }

.tbss-note-box {
  background: #fff6f6;
  border: 2px solid #c94b4b;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
}
.tbss-note-title { font-size: 18px; font-weight: 800; color: #a40000; text-align: center; margin-bottom: 10px; }
.tbss-note-box ol { margin: 0; padding-left: 22px; }
.tbss-note-box li { font-size: 15px; line-height: 1.7; font-weight: 700; color: #6a1d1d; margin-bottom: 6px; }

.tbss-section-title {
  background: #f7efe5;
  color: #7a1d1d;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  margin: 18px 0 14px;
  border: 1px solid #eadfce;
}

.tbss-field { margin-bottom: 14px; }
.tbss-field label { display: block; font-weight: 700; margin-bottom: 7px; font-size: 14px; color: #333; }

.tbss-wrap input[type="text"],
.tbss-wrap input[type="tel"],
.tbss-wrap input[type="number"],
.tbss-wrap select,
.tbss-admin-wrap input[type="text"],
.tbss-admin-wrap input[type="tel"],
.tbss-admin-wrap input[type="number"],
.tbss-admin-wrap input[type="password"],
.tbss-admin-wrap select {
  width: 100%;
  padding: 12px;
  border: 1px solid #cfc5b8;
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  outline: none;
  font-family: Arial, Helvetica, sans-serif;
}
.tbss-wrap input:focus, .tbss-wrap select:focus,
.tbss-admin-wrap input:focus, .tbss-admin-wrap select:focus {
  border-color: #b88a58;
  box-shadow: 0 0 0 3px rgba(184,138,88,.12);
}

.tbss-serial-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tbss-serial-label { font-size: 18px; font-weight: 800; color: #7a1d1d; }
.tbss-enroll-link { font-size: 13px; color: #555; }
.tbss-enroll-link a { color: #003c8f; text-decoration: none; font-weight: 700; }
.tbss-enroll-link a:hover { text-decoration: underline; }
.tbss-helper { font-size: 13px; color: #666; margin-top: 6px; line-height: 1.5; }

.tbss-item-card {
  background: #fffdfa;
  border: 1px solid #eadfce;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.tbss-item-card h4 { margin: 0 0 10px; color: #7a1d1d; font-size: 15px; line-height: 1.4; }
.tbss-subtext { font-size: 12px; color: #666; margin-top: 5px; }

.tbss-bill-box {
  background: #f8fbff;
  border: 1px solid #d7e5f4;
  border-radius: 12px;
  padding: 14px;
  margin-top: 16px;
  color: #1f3552;
}
.tbss-bill-line { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.tbss-bill-line:last-child { margin-bottom: 0; }
.tbss-bill-total { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #b9cde3; font-size: 18px; font-weight: 800; }

.tbss-btn {
  width: 100%;
  margin-top: 16px;
  padding: 15px;
  border: none;
  border-radius: 12px;
  background: #7a1d1d;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
}
.tbss-btn:hover { background: #611616; }

.tbss-form-msg {
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 14px;
}
.tbss-form-msg.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.tbss-form-msg.error   { background: #fdecea; color: #c62828; border: 1px solid #ef9a9a; }

/* ── Modals ────────────────────────────────────────────────────────────────── */
.tbss-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.48);
  z-index: 99999;
  padding: 16px;
  overflow-y: auto;
}
.tbss-modal-box {
  width: 100%;
  max-width: 520px;
  margin: 30px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 32px rgba(0,0,0,.22);
  overflow: hidden;
  animation: tbss-popin .18s ease-out;
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}
@keyframes tbss-popin {
  from { transform: scale(.96); opacity: .4; }
  to   { transform: scale(1);   opacity: 1; }
}
.tbss-modal-head { background: #f7efe5; color: #7a1d1d; padding: 14px 16px; font-size: 17px; font-weight: 800; border-bottom: 1px solid #eadfce; }
.tbss-modal-body { padding: 16px; font-size: 14px; line-height: 1.7; overflow-y: auto; flex: 1; }
.tbss-modal-body > div { margin-bottom: 5px; }
.tbss-hr { border: none; border-top: 1px dashed #ccc; margin: 12px 0; }
.tbss-modal-actions { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid #eee; background: #fff; }
.tbss-confirm-btn, .tbss-close-btn { flex: 1; border: none; border-radius: 10px; padding: 12px; font-size: 15px; font-weight: 800; cursor: pointer; font-family: Arial, Helvetica, sans-serif; }
.tbss-confirm-btn { background: #2f7d32; color: #fff; }
.tbss-confirm-btn:disabled { opacity: .55; cursor: not-allowed; }
.tbss-close-btn   { background: #ececec; color: #222; }
.tbss-confirm-btn:hover:not(:disabled) { background: #1b5e20; }
.tbss-close-btn:hover { background: #d5d5d5; }

.tbss-sum-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.tbss-sum-table th, .tbss-sum-table td { border: 1px solid #ddd; padding: 7px 6px; text-align: left; }
.tbss-sum-table th { background: #faf7f2; }
.tbss-grand-confirm { margin-top: 10px; font-size: 16px; font-weight: 800; color: #7a1d1d; }
.tbss-confirm-notes { font-weight: 700; color: #7a1d1d; font-size: 13px; }
.tbss-scroll-note { margin-top: 12px; padding: 10px 12px; background: #fff8dc; border: 1px solid #ead8a2; border-radius: 10px; font-size: 13px; font-weight: 700; color: #7a5a00; text-align: center; }

/* ── Admin Wrap ──────────────────────────────────────────────────────────── */
.tbss-admin-wrap { font-family: Arial, Helvetica, sans-serif; color: #222; }

/* Login */
.tbss-login-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 340px;
  padding: 20px;
}
.tbss-login-box {
  background: #fff;
  border: 1px solid #e5d9cc;
  border-radius: 18px;
  padding: 36px 32px;
  text-align: center;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0,0,0,.09);
}
.tbss-login-logo { font-size: 48px; margin-bottom: 8px; }
.tbss-login-box h2 { margin: 0 0 4px; color: #7a1d1d; font-size: 22px; }
.tbss-login-box p { margin: 0 0 20px; color: #666; font-size: 14px; }
.tbss-login-box input { margin-bottom: 14px; }
.tbss-login-msg { padding: 10px; border-radius: 8px; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.tbss-login-msg.error { background: #fdecea; color: #c62828; border: 1px solid #ef9a9a; }

/* Dashboard */
.tbss-admin-dashboard { padding: 16px; }
.tbss-admin-topbar {
  background: #7a1d1d;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.tbss-admin-title { font-size: 18px; font-weight: 800; }
.tbss-admin-topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tbss-refresh-label { font-size: 13px; color: #fdd; }

.tbss-stats-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.tbss-stat-card { flex: 1; min-width: 100px; border-radius: 12px; padding: 14px 10px; text-align: center; font-size: 13px; font-weight: 700; border: 1px solid #e5d9cc; }
.tbss-stat-num { font-size: 28px; font-weight: 900; margin-bottom: 4px; }
.tbss-stat-all      { background: #f0f4ff; color: #1a3c7a; border-color: #c5d0f0; }
.tbss-stat-pending  { background: #fff8e1; color: #795000; border-color: #ffe082; }
.tbss-stat-approved { background: #e8f5e9; color: #1b5e20; border-color: #a5d6a7; }

.tbss-admin-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.tbss-admin-select {
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  outline: none;
  font-family: Arial, Helvetica, sans-serif;
}
.tbss-admin-search {
  flex: 1;
  min-width: 180px;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  outline: none;
  font-family: Arial, Helvetica, sans-serif;
}
.tbss-admin-search:focus, .tbss-admin-select:focus { border-color: #b88a58; }

.tbss-bulk-actions { display: flex; align-items: center; gap: 6px; }

.tbss-admin-btn {
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  white-space: nowrap;
}
.tbss-btn-primary { background: #7a1d1d; color: #fff; }
.tbss-btn-primary:hover { background: #611616; }
.tbss-btn-sm { background: #f0f0f0; color: #333; }
.tbss-btn-sm:hover { background: #e0e0e0; }
.tbss-btn-danger { background: #c62828; color: #fff; }
.tbss-btn-danger:hover { background: #b71c1c; }
.tbss-btn-approve { background: #2e7d32; color: #fff; padding: 5px 10px; font-size: 12px; border-radius: 6px; border: none; cursor: pointer; font-weight: 700; white-space: nowrap; }
.tbss-btn-approve:hover { background: #1b5e20; }
.tbss-btn-edit    { background: #1565c0; color: #fff; padding: 5px 10px; font-size: 12px; border-radius: 6px; border: none; cursor: pointer; font-weight: 700; }
.tbss-btn-edit:hover { background: #0d47a1; }
.tbss-btn-delete  { background: #c62828; color: #fff; padding: 5px 10px; font-size: 12px; border-radius: 6px; border: none; cursor: pointer; font-weight: 700; }
.tbss-btn-delete:hover { background: #b71c1c; }

.tbss-admin-msg { padding: 10px 14px; border-radius: 8px; font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.tbss-admin-msg.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.tbss-admin-msg.error   { background: #fdecea; color: #c62828; border: 1px solid #ef9a9a; }

.tbss-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid #e5d9cc; }
.tbss-admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbss-admin-table th { background: #f7efe5; color: #7a1d1d; padding: 11px 10px; text-align: left; border-bottom: 2px solid #eadfce; font-size: 13px; white-space: nowrap; }
.tbss-admin-table td { padding: 10px; border-bottom: 1px solid #f0e8dc; vertical-align: top; }
.tbss-admin-table tr:last-child td { border-bottom: none; }
.tbss-admin-table tr:hover td { background: #fffdf9; }
.tbss-admin-table input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

.tbss-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 800; }
.tbss-badge-pending  { background: #fff8e1; color: #7a5000; border: 1px solid #ffe082; }
.tbss-badge-approved { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }

.tbss-actions-col { display: flex; gap: 5px; flex-wrap: wrap; }

.tbss-items-list { font-size: 12px; line-height: 1.6; }
.tbss-items-list span { display: block; }

/* Edit modal */
.tbss-edit-modal-box { max-width: 620px; max-height: 90vh; }
.tbss-edit-body { overflow-y: auto; }
.tbss-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Public approved table */
.tbss-public-approved { padding: 20px; }
.tbss-pub-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tbss-pub-toolbar label { font-weight: 700; font-size: 14px; }
.tbss-pub-date-input { padding: 9px 12px; border: 1px solid #ccc; border-radius: 8px; font-size: 14px; outline: none; font-family: Arial, Helvetica, sans-serif; }
.tbss-pub-date-input:focus { border-color: #b88a58; }

/* Responsive */
@media (max-width: 600px) {
  .tbss-top-box h1 { font-size: 19px; }
  .tbss-edit-grid { grid-template-columns: 1fr; }
  .tbss-admin-toolbar { flex-direction: column; align-items: stretch; }
  .tbss-admin-search { min-width: 100%; }
  .tbss-stats-row .tbss-stat-card { min-width: calc(33% - 8px); }
  .tbss-modal-box { margin: 16px auto; max-height: 90vh; }
  .tbss-admin-topbar { flex-direction: column; align-items: flex-start; }
}
