/**
 * IwanPay2 主题样式文件
 * 包含主题变量定义和相关样式
 */

/* 主题CSS变量定义 */
:root {
  /* 默认蓝色主题 */
  --theme-primary-50: #eff6ff;
  --theme-primary-100: #dbeafe;
  --theme-primary-200: #bfdbfe;
  --theme-primary-300: #93c5fd;
  --theme-primary-400: #60a5fa;
  --theme-primary-500: #3b82f6;
  --theme-primary-600: #2563eb;
  --theme-primary-700: #1d4ed8;
  --theme-primary-800: #1e40af;
  --theme-primary-900: #1e3a8a;
}

/* 红色主题 */
body[data-theme="red"] {
  --theme-primary-50: #fef2f2;
  --theme-primary-100: #fee2e2;
  --theme-primary-200: #fecaca;
  --theme-primary-300: #fca5a5;
  --theme-primary-400: #f87171;
  --theme-primary-500: #ef4444;
  --theme-primary-600: #dc2626;
  --theme-primary-700: #b91c1c;
  --theme-primary-800: #991b1b;
  --theme-primary-900: #7f1d1d;
}

/* 黄色主题 */
body[data-theme="yellow"] {
  --theme-primary-50: #fffbeb;
  --theme-primary-100: #fef3c7;
  --theme-primary-200: #fde68a;
  --theme-primary-300: #fcd34d;
  --theme-primary-400: #fbbf24;
  --theme-primary-500: #f59e0b;
  --theme-primary-600: #d97706;
  --theme-primary-700: #b45309;
  --theme-primary-800: #92400e;
  --theme-primary-900: #78350f;
}

/* 蓝色主题（默认） */
body[data-theme="blue"] {
  --theme-primary-50: #eff6ff;
  --theme-primary-100: #dbeafe;
  --theme-primary-200: #bfdbfe;
  --theme-primary-300: #93c5fd;
  --theme-primary-400: #60a5fa;
  --theme-primary-500: #3b82f6;
  --theme-primary-600: #2563eb;
  --theme-primary-700: #1d4ed8;
  --theme-primary-800: #1e40af;
  --theme-primary-900: #1e3a8a;
}

/* 绿色主题 */
body[data-theme="green"] {
  --theme-primary-50: #f0fdf4;
  --theme-primary-100: #dcfce7;
  --theme-primary-200: #bbf7d0;
  --theme-primary-300: #86efac;
  --theme-primary-400: #4ade80;
  --theme-primary-500: #22c55e;
  --theme-primary-600: #16a34a;
  --theme-primary-700: #15803d;
  --theme-primary-800: #166534;
  --theme-primary-900: #14532d;
}

/* 黑色主题 */
body[data-theme="black"] {
  --theme-primary-50: #f8fafc;
  --theme-primary-100: #f1f5f9;
  --theme-primary-200: #e2e8f0;
  --theme-primary-300: #cbd5e1;
  --theme-primary-400: #94a3b8;
  --theme-primary-500: #64748b;
  --theme-primary-600: #475569;
  --theme-primary-700: #334155;
  --theme-primary-800: #1e293b;
  --theme-primary-900: #0f172a;
}

/* 主体背景样式 */
body {
  transition: all 0.3s ease;
  background: linear-gradient(to bottom right, var(--theme-primary-50), var(--theme-primary-100));
}

/* 卡片组件 */
.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid #f1f5f9;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

/* 页面标题样式 */
.page-title {
  background: linear-gradient(135deg, var(--theme-primary-600) 0%, var(--theme-primary-700) 100%);
  color: white;
  padding: 1.5rem 2rem;
  border-radius: 16px 16px 0 0;
  margin: -1.5rem -2rem 2rem -2rem;
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 600;
}

.page-title i {
  margin-right: 0.75rem;
  font-size: 1.75rem;
}

/* 提示信息样式 */
.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #1e40af;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #92400e;
}

/* 记录区域样式 */
.records-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid #e2e8f0;
}

.records-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--theme-primary-700);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.records-title i {
    margin-right: 0.5rem;
    color: var(--theme-primary-500);
}

/* 传统样式兼容 */
.check {
    margin-top: 0;
    color: var(--theme-primary-600);
    text-decoration: none;
    font-weight: 500;
}

.check:hover {
    color: var(--theme-primary-700);
    text-decoration: none;
}

/* 复选框样式 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.checkbox-item:hover {
    border-color: var(--theme-primary-300);
    background: var(--theme-primary-50);
}

.checkbox-item input:checked + label {
    color: var(--theme-primary-700);
    font-weight: 500;
}

/* Bootstrap表格兼容 */
.bootstrap-table .fixed-table-toolbar .bs-bars {
    width: 100%;
}

/* 表单组样式 */
.form-section {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
}

.form-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--theme-primary-700);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.form-section-title i {
  margin-right: 0.5rem;
  color: var(--theme-primary-500);
}

/* 两列布局容器 */
.form-sections-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .form-sections-container {
    grid-template-columns: 1fr;
  }
}

/* 单独的form-section在两列布局中的样式 */
.form-sections-container .form-section {
  margin-bottom: 0;
  height: fit-content;
}

/* 全宽form-section */
.form-section.full-width {
  grid-column: 1 / -1;
}

/* 工具栏样式 */
.toolbar-container {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
}

/* 表单控件样式 */
.form-control {
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
  font-size: 1.4rem;
}

.form-control:focus {
  border-color: var(--theme-primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* 按钮组件 */
.btn-primary {
  background: linear-gradient(135deg, var(--theme-primary-500) 0%, var(--theme-primary-600) 100%);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
  color: white;
  cursor: pointer;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--theme-primary-600) 0%, var(--theme-primary-700) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
  transform: scale(0.95) translateY(0);
}

.btn-info {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(6, 182, 212, 0.2);
  color: white;
  cursor: pointer;
}

.btn-info:hover {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(6, 182, 212, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
  color: white;
  cursor: pointer;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
  color: white;
  cursor: pointer;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
  color: white;
  cursor: pointer;
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

/* 主题适配样式 */
a {
  color: var(--theme-primary-800, #1e40af);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--theme-primary-600, #2563eb);
}

.text-yellow {
  font-size: 16px;
  color: var(--theme-primary-600, #d97706);
  font-weight: 600;
  transition: color 0.3s ease;
}

.tishi {
  margin-top: 20px;
  padding: 12px;
  background-color: var(--theme-primary-50, #eff6ff);
  border-left: 4px solid var(--theme-primary-500, #3b82f6);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.lingwai {
  margin-top: 10px;
  padding: 10px;
  background-color: var(--theme-primary-50, #eff6ff);
  border-radius: 6px;
  border: 1px solid var(--theme-primary-200, #bfdbfe);
  transition: all 0.3s ease;
}

.input-size {
  height: 22px;
  width: 48px;
  text-align: center;
  border: 1px solid var(--theme-primary-300, #93c5fd);
  border-radius: 4px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-size:focus {
  outline: none;
  border-color: var(--theme-primary-500, #3b82f6);
  box-shadow: 0 0 0 3px var(--theme-primary-100, #dbeafe);
}

.tip {
  color: #dc2626;
}

/* 主题适配的按钮样式 */
.btn-theme-primary {
  background-color: var(--theme-primary-600, #2563eb);
  border-color: var(--theme-primary-600, #2563eb);
  color: white;
  transition: all 0.3s ease;
}

.btn-theme-primary:hover {
  background-color: var(--theme-primary-700, #1d4ed8);
  border-color: var(--theme-primary-700, #1d4ed8);
  color: white;
}

/* 表格主题适配 */
.table-no-bordered th {
  background-color: var(--theme-primary-50, #eff6ff);
  color: var(--theme-primary-800, #1e40af);
  border-bottom: 2px solid var(--theme-primary-200, #bfdbfe);
  transition: all 0.3s ease;
}

.table-no-bordered tbody tr:hover {
  background-color: var(--theme-primary-50, #eff6ff);
  transition: background-color 0.3s ease;
}

/* 选项卡主题适配 */
.nav-tabs > li.active > a {
  background-color: var(--theme-primary-50, #eff6ff);
  border-color: var(--theme-primary-200, #bfdbfe);
  color: var(--theme-primary-700, #1d4ed8);
}

/* AllAreaResend.cshtml 特有样式 */
.refill,
.detection,
.edit,
.load,
.clone,
.bufa,
.delete {
  margin-right: 10px;
}

.m-t-10 {
  display: inline-block;
  padding-top: 7px;
  padding-bottom: 7px;
}

.or {
  font-weight: 500;
  margin-right: 15px;
}

.how-send {
  background-color: #f2f2f2;
  padding-left: 28px;
  width: 380px;
}

.btn-secondary {
  background-color: var(--theme-primary-50);
  color: var(--theme-primary-600);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid var(--theme-primary-200);
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--theme-primary-100);
  box-shadow: 0 4px 15px -3px var(--theme-primary-200);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--theme-primary-600);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid var(--theme-primary-200);
  cursor: pointer;
}

.btn-outline:hover {
  background-color: var(--theme-primary-50);
  border-color: var(--theme-primary-300);
  box-shadow: 0 4px 15px -3px var(--theme-primary-200);
  transform: translateY(-1px);
}

/* 导航链接 */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  color: #6b7280;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-link:hover {
  background-color: var(--theme-primary-50);
  color: var(--theme-primary-600);
  transform: translateY(-1px);
}

.nav-link.active {
  background-color: var(--theme-primary-100);
  color: var(--theme-primary-700);
  font-weight: 500;
}

/* 菜单项 */
.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: var(--theme-primary-600) !important;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.menu-item:hover {
  background-color: var(--theme-primary-50) !important;
  color: var(--theme-primary-600) !important;
  transform: translateY(-1px) scale(1.02);
}

.menu-item.active {
  background-color: var(--theme-primary-100);
  color: var(--theme-primary-700) !important;
  font-weight: 500;
  transform: scale(1.02);
}

/* 菜单项图标 */
.menu-item i {
  color: var(--theme-primary-600) !important;
  transition: all 0.2s ease;
}

.menu-item:hover i {
  color: var(--theme-primary-600) !important;
}

.menu-item.active i {
  color: var(--theme-primary-700) !important;
}

/* 状态徽章 */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.status-badge:hover {
  transform: scale(1.1);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.status-badge.success {
  background-color: #dcfce7;
  color: #15803d;
}

.status-badge.success:hover {
  background-color: #bbf7d0;
}

.status-badge.warning {
  background-color: #fef3c7;
  color: #b45309;
}

.status-badge.warning:hover {
  background-color: #fde68a;
}

.status-badge.error {
  background-color: #fee2e2;
  color: #b91c1c;
}

.status-badge.error:hover {
  background-color: #fecaca;
}

.status-badge.info {
  background-color: var(--theme-primary-100);
  color: var(--theme-primary-700);
}

.status-badge.info:hover {
  background-color: var(--theme-primary-200);
}

/* 表格样式 */
.table-header {
  background-color: var(--theme-primary-50);
  border-bottom: 1px solid var(--theme-primary-100);
}

.table-row {
  border-bottom: 1px solid #f3f4f6;
}

/* 输入框 */
.input-field {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.input-field:hover {
  border-color: var(--theme-primary-300);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.input-field:focus {
  outline: none;
  border-color: var(--theme-primary-500);
  box-shadow: 0 0 0 3px var(--theme-primary-100);
  transform: translateY(-1px);
}

/* 用户头像 */
.user-avatar {
  position: relative;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.125rem;
  background: linear-gradient(to bottom right, var(--theme-primary-400), var(--theme-primary-600));
}

.user-status {
  position: absolute;
  bottom: -0.25rem;
  right: -0.25rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid white;
}

.user-status.online {
  background-color: #22c55e;
}

.user-status.offline {
  background-color: #9ca3af;
}

/* 统计卡片 */
.stat-card {
  background: white;
  border-radius: 0.5rem;
  padding: 1rem 2rem;
  transition: all 0.3s ease;
  border: 1px solid var(--theme-primary-100);
}

.stat-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px var(--theme-primary-100);
  transform: translateY(-2px) scale(1.02);
}

.stat-value {
  font-size: 3rem;
  font-weight: 700;
  color: var(--theme-primary-600);
  transition: all 0.2s ease;
}

.stat-label {
  font-size: 1.5rem;
  color: #6b7280;
  margin-top: 0.25rem;
  transition: all 0.2s ease;
}

.stat-card:hover .stat-value {
  color: var(--theme-primary-700);
  transform: scale(1.1);
}

.stat-card:hover .stat-label {
  color: #4b5563;
}

/* 动画类 */
.fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

.bounce-in {
  animation: bounceIn 0.8s ease-out;
}

.scale-in {
  animation: scaleIn 0.4s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
  }
}

/* 工具类 */
.text-gradient {
  background: linear-gradient(to right, var(--theme-primary-600), var(--theme-primary-800));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}

.shadow-soft {
  box-shadow: 0 2px 15px -3px var(--theme-primary-100), 0 10px 20px -2px var(--theme-primary-50);
}

.border-gradient {
  border: 1px solid transparent;
  background: linear-gradient(to right, var(--theme-primary-200), var(--theme-primary-300));
  background-clip: border-box;
}

/* 响应式隐藏 */
.mobile-hidden {
  display: none;
}

.mobile-only {
  display: block;
}

@media (min-width: 768px) {
  .mobile-hidden {
    display: block;
  }

  .mobile-only {
    display: none;
  }
}

/* 主题切换器特殊样式 */
#theme-switcher {
  z-index: 9999;
}

#theme-switcher .theme-switcher-container {
  position: relative;
}

#theme-switcher .theme-panel {
  right: 0;
  top: 0;
}

#theme-switcher .theme-btn {
  cursor: pointer;
  transition: all 0.3s ease;
}

#theme-switcher .theme-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.2);
}

#theme-switcher .theme-btn:active {
  transform: scale(0.95);
}

/* 主题切换动画 */
.theme-transition {
  transition: all 0.3s ease;
}

/* 确保主题切换器在最顶层 */
.fixed {
  position: fixed;
}

.top-4 {
  top: 1rem;
}

.right-4 {
  right: 1rem;
}

.z-50 {
  z-index: 50;
}

/* 全局a标签样式，确保无下划线 */
a {
  text-decoration: none !important;
}

a:hover {
  text-decoration: none !important;
}