/* 溯心 (SoulTrace) - 认证门禁、反馈系统与管理员工作台样式系统 */

.header-user-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-quota-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.user-quota-badge strong {
  color: #38bdf8;
  font-weight: 700;
}

.btn-admin {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(99, 102, 241, 0.25));
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #e9d5ff !important;
}

.btn-admin:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(99, 102, 241, 0.4));
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
}

/* 未读红点提醒 */
.btn-notification {
  position: relative;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pulse-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  background-color: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444;
  animation: pulseAnim 1.6s infinite;
}

@keyframes pulseAnim {
  0% { transform: scale(0.95); opacity: 0.9; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.9; }
}

/* 模态框遮罩层 */
.st-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 10, 20, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.st-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.st-modal-container {
  background: rgba(22, 25, 45, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(99, 102, 241, 0.15);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.st-modal-overlay.active .st-modal-container {
  transform: translateY(0) scale(1);
}

.st-modal-container.modal-lg {
  max-width: 1040px;
}

.st-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.st-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.st-modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  line-height: 1;
  transition: color 0.15s;
}

.st-modal-close:hover {
  color: #ffffff;
}

.st-modal-body {
  padding: 24px;
  color: #cbd5e1;
}

/* Tabs */
.st-tabs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: rgba(15, 18, 35, 0.6);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}

.st-tab-btn {
  flex: 1;
  padding: 8px 14px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
}

.st-tab-btn.active {
  background: rgba(99, 102, 241, 0.25);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Form Styles */
.st-form-group {
  margin-bottom: 16px;
}

.st-form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 6px;
}

.st-input, .st-textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(15, 18, 35, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #f8fafc;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.st-input:focus, .st-textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.st-textarea {
  resize: vertical;
  min-height: 80px;
}

.st-input-hint {
  font-size: 12px;
  color: #64748b;
  margin-top: 5px;
}

.st-btn-submit {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.st-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.st-alert-msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.st-alert-msg.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.st-alert-msg.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

/* Star Rating Component */
.star-rating-box {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.star-item {
  font-size: 28px;
  cursor: pointer;
  color: #475569;
  transition: transform 0.15s, color 0.15s;
  user-select: none;
}

.star-item:hover, .star-item.active {
  color: #fbbf24;
  transform: scale(1.15);
}

/* Tables */
.st-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.st-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.st-table th {
  background: rgba(15, 18, 35, 0.7);
  padding: 12px 16px;
  color: #94a3b8;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.st-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  white-space: nowrap;
}

.st-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.badge-tag.active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-tag.disabled {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.action-btn-sm {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.action-btn-sm:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
}

/* Admin Dashboard Elements */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: rgba(15, 18, 35, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
}

.admin-stat-title {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 6px;
}

.admin-stat-val {
  font-size: 26px;
  font-weight: 700;
  color: #f8fafc;
}

.admin-stat-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

/* Floating QR Code Widget */
.floating-qr-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
}

.floating-qr-btn {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(168, 85, 247, 0.9));
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  transition: transform 0.2s, box-shadow 0.2s;
}

.floating-qr-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6);
}

.floating-qr-card {
  position: absolute;
  bottom: 50px;
  right: 0;
  background: rgba(22, 25, 45, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  width: 320px;
  display: none;
  flex-direction: column;
  gap: 16px;
}

.floating-qr-card.show {
  display: flex;
  animation: qrPop 0.2s ease-out;
}

@keyframes qrPop {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.qr-item-box {
  text-align: center;
  background: rgba(15, 18, 35, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
}

.qr-img {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  margin: 8px auto;
  display: block;
}

.qr-title {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
}

.qr-subtitle {
  font-size: 11px;
  color: #94a3b8;
}

/* ================== 用户协议与免责声明模态框样式 ================== */
.terms-modal-container {
  max-width: 860px;
  width: 94%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: rgba(15, 18, 35, 0.98);
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(99, 102, 241, 0.15);
}

.terms-scroll-area {
  max-height: calc(85vh - 170px);
  overflow-y: auto;
  padding: 24px;
  background: rgba(10, 12, 26, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terms-scroll-area::-webkit-scrollbar {
  width: 8px;
}
.terms-scroll-area::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}
.terms-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.terms-scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

.terms-content-inner {
  font-size: 13.5px;
  line-height: 1.8;
  color: #cbd5e1;
}

.terms-badge-notice {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fde047;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terms-section-title {
  color: #f8fafc;
  font-size: 15.5px;
  font-weight: 700;
  margin: 22px 0 10px 0;
  letter-spacing: 0.3px;
  border-left: 3px solid #6366f1;
  padding-left: 10px;
}

.terms-text {
  color: #cbd5e1;
  margin-bottom: 12px;
}

.terms-alert-card {
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.terms-alert-card.warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fef3c7;
}

.terms-alert-card.danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fee2e2;
}

.terms-alert-card.red-zone {
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.45);
  color: #ffe4e6;
}

.terms-alert-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1.2;
}

.terms-alert-body {
  flex: 1;
}

.terms-alert-body strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #fff;
}

.terms-alert-body p {
  margin: 0;
  line-height: 1.7;
}

.terms-alert-body ul {
  margin: 10px 0 0 20px;
  padding: 0;
  line-height: 1.75;
}

.terms-footer-bar {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(18, 22, 42, 0.98);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.terms-timer-hint {
  font-size: 13px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.terms-actions {
  display: flex;
  gap: 14px;
}

#btn-agree-terms:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(30%);
  background: #475569 !important;
  box-shadow: none !important;
}
