:root {
  --brand: #3b82f6;
  --brand-strong: #2563eb;
  --brand-soft: #e0f2fe;
  --border-soft: #e2e8f0;
  --soft: #f5f7fb;
  --card-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 55%);
  color: #0f172a;
}

.nav-pill {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 6px 14px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-soft);
  color: #0f172a;
  transition: all 0.2s ease;
}

.nav-pill.dropdown-toggle::after {
  margin-left: 4px;
}

.nav-pill.btn {
  text-decoration: none;
  color: inherit;
}

.topbar {
  flex-wrap: nowrap;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 10px 14px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.nav-group {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-pill:hover {
  background: #e2e8f0;
  border-color: #cbd5f5;
  transform: translateY(-1px);
}

.hero-card {
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-soft);
  height: 100%;
  background: #ffffff;
}

.admin-notice-card {
  border: 2px solid #7dd3fc;
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.16);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 70%);
}

.history-card {
  border: 2px solid #0ea5e9;
  background: #ffffff;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: linear-gradient(135deg, #eef2ff 0%, #ffffff 60%);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  margin-bottom: 18px;
}

.page-hero h4 {
  margin-bottom: 4px;
  font-weight: 700;
}

.page-hero .page-subtitle {
  color: #64748b;
  font-size: 13px;
}

.form-card {
  border-radius: 18px;
  border: 2px solid #38bdf8;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

.info-card {
  border-radius: 18px;
  border: 2px solid #a7f3d0;
  background: #f8fafc;
}

.table thead th {
  font-size: 13px;
  color: #475569;
}

.bank-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bae6fd;
}

.hero-card .card-body {
  min-height: 220px;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.notice-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.notice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  font-size: 14px;
}

.notice-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.notice-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: #0369a1;
  font-weight: 600;
}

.category-pill {
  background: #f1f5ff;
  color: #1e3a8a;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 600;
  border: 1px solid #dbeafe;
  transition: all 0.2s ease;
}

.category-pill:hover {
  background: #e0e7ff;
  transform: translateY(-1px);
}

.product-card {
  border: 2px solid #86efac;
  border-radius: 16px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.product-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.product-desc {
  line-height: 1.2;
}

.product-meta {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.product-meta .bi-star-fill,
.product-meta .bi-star-half {
  color: #f59e0b;
}

.product-detail-card {
  border-radius: 18px;
  border: 2px solid #bae6fd;
  box-shadow: var(--card-shadow);
  background: #ffffff;
}

.product-breadcrumb .breadcrumb {
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
}

.product-breadcrumb a {
  color: #1d4ed8;
  text-decoration: none;
}

.product-breadcrumb a:hover {
  text-decoration: underline;
}

.product-gallery {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.product-gallery img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.product-tag {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-weight: 600;
}

.product-tag.soft {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f59e0b;
  font-size: 14px;
}

.product-rating span {
  color: #64748b;
  font-weight: 500;
}

.product-price {
  font-size: 28px;
  font-weight: 700;
  color: #dc2626;
  margin: 16px 0;
}

.product-price-note {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.product-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: #f8fafc;
}

.buy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.license-info {
  display: grid;
  gap: 12px;
}

.license-item {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: #ffffff;
}

.license-item i {
  font-size: 20px;
  color: #0ea5e9;
}

.feature-list {
  display: grid;
  gap: 10px;
  color: #0f172a;
}

.feature-list i {
  color: #22c55e;
  margin-right: 8px;
}

.spec-list {
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.spec-list > div {
  display: flex;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e2e8f0;
}

.chat-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
  z-index: 1050;
}

.chat-toggle i {
  font-size: 18px;
}

.chat-panel {
  position: fixed;
  right: 24px;
  bottom: 90px;
  width: 320px;
  max-width: calc(100vw - 48px);
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.2);
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 1050;
}

.chat-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: #f8fafc;
}

.chat-body {
  padding: 12px;
  display: grid;
  gap: 10px;
  background: #ffffff;
  max-height: 260px;
  overflow-y: auto;
}

.chat-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-message.admin {
  align-items: flex-start;
}

.chat-message.user {
  align-items: flex-end;
}

.chat-bubble {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.3;
}

.chat-message.admin .chat-bubble {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

.chat-message.user .chat-bubble {
  background: #2563eb;
  color: #ffffff;
}

.chat-time {
  font-size: 11px;
  color: #94a3b8;
}

.chat-footer {
  padding: 12px;
  border-top: 1px solid var(--border-soft);
  background: #f8fafc;
}

.buy-product-img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.buy-price {
  font-size: 18px;
  font-weight: 700;
  color: #dc2626;
  margin-top: 6px;
}

.buy-info {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.buy-info > div {
  display: flex;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e2e8f0;
}

.product-image {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-actions {
  display: flex;
  gap: 14px;
  margin-top: 4px;
}

.product-btn {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid #1d4ed8;
  padding: 6px 18px;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.2);
}

.product-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.product-btn.secondary {
  background: #ffffff;
  color: #16a34a;
  border: 2px solid #22c55e;
  box-shadow: 0 6px 12px rgba(34, 197, 94, 0.16);
}

.product-btn.secondary:hover {
  background: #ecfdf3;
}

.product-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e0e7ff;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #4338ca;
}

.avatar-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.18);
}

.user-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  color: #0f172a;
}

.user-balance {
  font-size: 12px;
  color: #16a34a;
  background: #ecfdf3;
  border: 1px solid #22c55e;
  padding: 2px 8px;
  border-radius: 999px;
}

.search-group {
  background: #ffffff;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  padding: 4px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.search-group .input-group-text {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 18px;
}

.search-group .form-control {
  border: none;
  box-shadow: none;
}

.search-group .form-control::placeholder {
  color: #94a3b8;
}

.search-group .btn {
  border-radius: 999px;
  padding: 8px 18px;
}

.logo-img {
  height: 42px;
  width: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.12);
}

.footer {
  margin-top: 40px;
  padding: 30px 0;
  border-top: 1px solid var(--border-soft);
  background: #f8fafc;
}

.footer-title {
  font-weight: 600;
  margin-bottom: 10px;
}

.footer-link {
  color: #475569;
  text-decoration: none;
  display: block;
  margin-bottom: 6px;
}

.footer-link:hover {
  color: #1d4ed8;
}

.history-table tbody tr:hover {
  background: #f8fafc;
}

.amount-positive {
  color: #16a34a;
  font-weight: 600;
}

.amount-negative {
  color: #dc2626;
  font-weight: 600;
}

.status-success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.status-pending {
  background: #fef9c3;
  color: #a16207;
  border: 1px solid #fde047;
}

.status-cancel {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.category-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 16px 0 12px;
}

.category-tab {
  border: none;
  cursor: pointer;
}

.category-tab.active {
  background: #0ea5e9;
  color: #ffffff;
  border-color: #0ea5e9;
}

.category-section {
  display: none;
  margin-bottom: 20px;
}

.category-section.active {
  display: block;
}

.notice-modal .modal-content {
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-soft);
}

.notice-modal .modal-header {
  border-bottom: 1px solid var(--border-soft);
  background: #f8fafc;
}

.notice-modal .modal-title {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notice-modal .modal-body {
  color: #0f172a;
}

.notice-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.notice-link:hover {
  text-decoration: underline;
}

.btn-notice {
  background: #ef4444;
  color: #ffffff;
  font-weight: 600;
  border-radius: 10px;
  padding: 8px 14px;
}

.btn-notice:hover {
  background: #dc2626;
  color: #ffffff;
}
