/* Weenumber Classic + Modern Responsive Stylesheet */

:root {
  --primary: #337ab7;
  --primary-hover: #23527c;
  --accent: #f59e0b;
  --bg: #fdfdfd;
  --text: #333333;
  --text-muted: #777777;
  --border: #dddddd;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Prompt", Arial, sans-serif;
  --font-comic: "Comic Sans MS", "Chalkboard SE", "Comic Neue", cursive, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  padding-top: 15px;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Masthead & Brand */
.masthead {
  margin-bottom: 25px;
}

.masthead-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding: 0 4px;
}

.masthead-brand {
  margin: 0;
  font-size: 32px;
  font-weight: bold;
  line-height: 1.2;
}

.masthead-brand a {
  color: #555555;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.masthead-brand a:hover {
  color: #222222;
}

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.masthead-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.masthead-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.masthead-btn.admin-btn {
  background: #fff;
  border-color: #d1d5db;
  color: #6b7280;
}

.masthead-btn.admin-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

/* Classic Justified Navigation Menu */
.nav-justified-wrap {
  width: 100%;
  overflow-x: auto;
}

.nav-justified {
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 5px;
  display: flex;
  flex-direction: row;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 760px;
}

.nav-justified > li {
  flex: 1 1 0;
  text-align: center;
}

.nav-justified > li > a {
  display: block;
  padding: 13px 4px;
  font-weight: bold;
  font-size: 13px;
  color: #555555;
  text-decoration: none;
  text-align: center;
  background-color: #e5e5e5;
  background-image: linear-gradient(to bottom, #f5f5f5 0%, #e5e5e5 100%);
  border-right: 1px solid #d5d5d5;
  border-left: 1px solid #ffffff;
  white-space: nowrap;
  transition: background 0.1s;
}

.nav-justified > li:first-child > a {
  border-left: 0;
  border-radius: 4px 0 0 4px;
}

.nav-justified > li:last-child > a {
  border-right: 0;
  border-radius: 0 4px 4px 0;
}

.nav-justified > li > a:hover {
  background-color: #dedede;
  color: #222222;
}

.nav-justified > .active > a,
.nav-justified > .active > a:hover {
  background-color: #ddd;
  background-image: none;
  box-shadow: inset 0 3px 7px rgba(0,0,0,.15);
  color: #222222;
}

/* Banner */
.slideform {
  display: block;
  margin: 25px auto 25px auto;
  text-align: center;
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.img-responsive {
  max-width: 100%;
  height: auto;
}

/* Topic Section */
#topicSection {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

#topicTitle {
  font-size: 24px;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #337ab7;
}

#topicDetail {
  line-height: 1.8;
  color: #334155;
  font-size: 15px;
}

#topicDetail img {
  max-width: 100%;
  height: auto;
}

/* Filter & Search Box */
.search-card {
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.search-primary-row {
  margin-bottom: 12px;
}

.search-box-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.search-box-input:focus {
  border-color: #66afe9;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}

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

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
}

.filter-group label {
  font-weight: 600;
  white-space: nowrap;
}

.filter-select, .filter-input {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #ffffff;
  color: #333333;
  outline: none;
}

.filter-select:focus, .filter-input:focus {
  border-color: #66afe9;
}

.filter-pills-row {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.pill-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-right: 4px;
}

.sum-pill {
  display: inline-block;
  padding: 3px 8px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}

.sum-pill:hover, .sum-pill.active {
  background: #337ab7;
  color: #ffffff;
  border-color: #2e6da4;
}

/* Table Style (Bootstrap 3 Table Striped) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 20px;
}

.table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
  padding: 10px 14px;
  line-height: 1.42857143;
  vertical-align: middle;
  border-top: 1px solid #ddd;
}

.table > thead > tr > th {
  vertical-align: bottom;
  border-bottom: 2px solid #ddd;
  background-color: #f7f7f7;
  color: #333333;
  font-size: 15px;
  font-weight: bold;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #f9f9f9;
}

.table-striped > tbody > tr:hover {
  background-color: #f5f5f5;
}

.commicSans {
  font-family: var(--font-comic);
  font-size: 20px;
}

.sim-phone {
  font-weight: bold;
  letter-spacing: 0.5px;
  color: #222222;
}

.badge-sum {
  display: inline-block;
  min-width: 28px;
  padding: 3px 7px;
  font-size: 13px;
  font-weight: bold;
  color: #ffffff;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  text-align: center;
  background-color: #777777;
  border-radius: 10px;
}

.price {
  text-align: right;
  font-weight: bold;
  white-space: nowrap;
}

.cart a {
  color: #337ab7;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}

.cart a:hover {
  color: #23527c;
  background-color: #eaf2f8;
  text-decoration: none;
}

/* Pagination */
.pagination-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0 30px;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-info {
  font-size: 13px;
  color: #64748b;
}

.pagination {
  display: inline-flex;
  padding-left: 0;
  border-radius: 4px;
}

.page-btn {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.42857143;
  color: #337ab7;
  background-color: #fff;
  border: 1px solid #ddd;
  margin-left: -1px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}

.page-btn:first-child {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  margin-left: 0;
}

.page-btn:last-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.page-btn:hover {
  background-color: #eee;
  border-color: #ddd;
  color: #23527c;
}

.page-btn.active {
  z-index: 2;
  color: #fff;
  background-color: #337ab7;
  border-color: #337ab7;
  cursor: default;
}

.page-btn.disabled {
  color: #777;
  background-color: #fff;
  border-color: #ddd;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Bottom Row (Bank + Shipped items) */
.bank-shipped-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 35px;
}

.col-half {
  flex: 1 1 320px;
}

.panel {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,.05);
}

.panel-default > .panel-heading {
  color: #333;
  background-color: #f5f5f5;
  border-color: #ddd;
  padding: 10px 15px;
  border-bottom: 1px solid #ddd;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}

.panel-title {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 16px;
  font-weight: bold;
}

.panel-body {
  padding: 15px;
  line-height: 1.8;
}

.shipped-order-line {
  padding: 6px 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 14px;
}

.shipped-order-line:last-child {
  border-bottom: none;
}

.shipped-order-line a {
  color: #337ab7;
  text-decoration: none;
  font-weight: 500;
}

.shipped-order-line a:hover {
  text-decoration: underline;
  color: #23527c;
}

/* Footer (Original Dark Grey Style) */
footer {
  background-color: #585650;
  color: #aeaeac;
  border-top: 1px solid #ddd;
  padding-top: 30px;
  padding-bottom: 30px;
  margin-top: 40px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
}

.footer-col-5 {
  flex: 1 1 320px;
}

.footer-col-3 {
  flex: 0 1 180px;
  text-align: center;
}

.footer-col-4 {
  flex: 1 1 260px;
}

footer h4 {
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 12px;
}

footer p, footer li {
  font-size: 13px;
  line-height: 1.8;
}

footer ul {
  padding-left: 20px;
}

footer a {
  color: #ffffff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.footer-contact-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.footer-copy {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid #6b6963;
  text-align: center;
  font-size: 12px;
  color: #8c8c88;
}

/* Buttons & Utilities */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background: #0284c7;
  color: white;
  border-color: #0369a1;
}

.btn-primary:hover {
  background: #0369a1;
}

.btn-outline {
  background: white;
  color: #334155;
  border-color: #cbd5e1;
}

.btn-outline:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #ffffff;
  border-radius: 8px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  padding: 24px;
  position: relative;
  animation: modalIn 0.2s ease-out;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
  font-size: 18px;
  color: #1e293b;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: #334155;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #334155;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  outline: none;
  background: #fff;
  transition: border-color 0.15s;
}

.form-control:focus {
  border-color: #337ab7;
  box-shadow: 0 0 0 2px rgba(51, 122, 183, 0.2);
}

.btn-submit {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
  background-color: #337ab7;
  border: 1px solid #2e6da4;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 10px;
}

.btn-submit:hover {
  background-color: #286090;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 2000;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
  pointer-events: none;
}

.toast.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .masthead-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    justify-content: space-between;
  }
  
  .footer-col-3 {
    text-align: left;
  }
}
