/* Modern Design System */
:root {
  --primary-color: #6366f1;
  --primary-hover: #5855eb;
  --primary-light: #eef2ff;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #06b6d4;
  --light-color: #f8fafc;
  --dark-color: #1e293b;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #334155;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* 导入现代字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Global Enhancements */
.container-fluid {
  max-width: 1400px;
  margin: 0 auto;
}

/* Modern Navigation */
.navbar {
  background: var(--gradient-primary) !important;
  box-shadow: var(--shadow-lg);
  border: none;
  backdrop-filter: blur(20px);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.navbar .btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

/* Simple Multilingual Field Styles */
.simple-multilingual-field {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    background-color: #ffffff;
    margin-bottom: 1rem;
}

.simple-multilingual-field .default-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.simple-multilingual-field .default-input-wrapper input {
    flex: 1;
}

.simple-multilingual-field .multilingual-inputs {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}

.simple-multilingual-field .form-label.small {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.simple-multilingual-field .form-control-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Responsive adjustments for multilingual fields */
@media (max-width: 768px) {
    .simple-multilingual-field .multilingual-inputs .row {
        margin: 0;
    }
    .simple-multilingual-field .multilingual-inputs .col-md-4 {
        padding: 0.25rem;
        margin-bottom: 0.5rem;
    }
}

/* Language Switcher */
.language-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 12px 16px;
  border-radius: 25px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.language-switcher a {
  text-decoration: none;
  color: #2c2c2c;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 18px;
  transition: all 0.3s ease;
  min-width: 40px;
  text-align: center;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.language-switcher a.active {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  box-shadow: 0 3px 12px rgba(0, 123, 255, 0.4), 0 1px 4px rgba(0, 123, 255, 0.2);
  transform: scale(1.05);
  border: 1px solid #0056b3;
}

.language-switcher a:hover:not(.active) {
  background: rgba(0, 123, 255, 0.15);
  color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
  border: 1px solid rgba(0, 123, 255, 0.3);
}

.language-switcher-inline {
  font-size: 14px;
}

.language-switcher-inline a {
  text-decoration: none;
  color: #666;
  margin: 0 4px;
  transition: color 0.2s ease;
}

.language-switcher-inline a.active {
  color: var(--primary-color);
  font-weight: 500;
}

.language-switcher-inline a:hover {
  color: var(--primary-color);
}

/* Dashboard Language Dropdown */
.navbar .dropdown-item.active {
  background-color: rgba(0, 123, 255, 0.1);
  color: var(--primary-color);
  font-weight: 500;
}

.navbar .dropdown-item:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

.navbar .feather-sm {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

/* Auth Pages */
.auth-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.auth-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

/* Dashboard */
.navbar-brand {
  font-weight: 600;
  font-size: 1.25rem;
}

.feather-sm {
  width: 16px;
  height: 16px;
}

/* Modern Cards */
.card {
  border: none;
  border-radius: var(--border-radius-lg);
  background: white;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 2rem;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  color: var(--dark-color);
  padding: 1.5rem 2rem 1rem;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.card-body {
  padding: 2rem;
}

/* Color Preview */
.color-preview {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Modern Forms */
.form-control, .form-select {
  border-radius: var(--border-radius);
  border: 2px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  background: white;
  font-weight: 500;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.form-label {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-text {
  color: #64748b;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.form-control-color {
  width: 60px;
  height: 38px;
  border-radius: var(--border-radius);
  border: 2px solid #e2e8f0;
  cursor: pointer;
}

.form-control-color::-webkit-color-swatch-wrapper {
  padding: 0;
}

.form-control-color::-webkit-color-swatch {
  border: none;
  border-radius: calc(var(--border-radius) - 2px);
}

/* Modern Buttons */
.btn {
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
  z-index: -1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  border-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--gradient-primary);
  border-color: var(--primary-hover);
  color: white;
}

.btn-outline-primary {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-success {
  background: var(--gradient-success);
  border-color: var(--success-color);
}

.btn-danger {
  background: var(--gradient-secondary);
  border-color: var(--danger-color);
}

/* Modern Tables */
.table {
  font-size: 0.9rem;
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  border-top: none;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 700;
  color: var(--dark-color);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f8fafc;
  padding: 1rem 0.75rem;
}

.table td {
  border-bottom: 1px solid #f1f5f9;
  padding: 1rem 0.75rem;
  vertical-align: middle;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background-color: #f8fafc;
  transform: scale(1.01);
  box-shadow: var(--shadow);
}

.table-responsive {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Modern Badges */
.badge {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: capitalize;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
}

.badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.badge:hover::before {
  left: 100%;
}

.bg-success {
  background: var(--gradient-success) !important;
}

.bg-danger {
  background: var(--gradient-secondary) !important;
}

.bg-secondary {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
}

.bg-info {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
}

.bg-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

/* Modern Modals */
.modal-content {
  border-radius: var(--border-radius-lg);
  border: none;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.95);
}

.modal-header {
  border-bottom: 1px solid #e2e8f0;
  padding: 1.5rem 2rem 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-title {
  font-weight: 700;
  color: var(--dark-color);
  font-size: 1.25rem;
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  border-top: 1px solid #e2e8f0;
  padding: 1rem 2rem 1.5rem;
  background: #f8fafc;
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.modal.fade .modal-dialog {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(-50px) scale(0.9);
}

.modal.show .modal-dialog {
  transform: translateY(0) scale(1);
}

/* Modern Public Page Styles */
.public-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.public-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  animation: float 20s linear infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-60px); }
}

.merchant-container {
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-lg);
  margin: 2rem auto;
  max-width: 500px;
  box-shadow: var(--shadow-xl);
}

.merchant-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  padding: 2rem;
  text-align: center;
}

.merchant-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  background: white;
  padding: 0.5rem;
  object-fit: contain;
  box-shadow: var(--shadow-lg);
  border: 4px solid rgba(255, 255, 255, 0.8);
}

.merchant-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.merchant-links {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.link-btn {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  padding: 1.25rem;
  border: none;
  border-radius: var(--border-radius);
  color: white;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.link-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.link-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.link-btn:hover::before {
  left: 100%;
}

.link-main {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.link-subtitle {
  font-size: 0.85rem;
  opacity: 0.9;
  font-weight: 400;
  margin-top: 0.5rem;
  line-height: 1.2;
}

/* Responsive */
@media (max-width: 768px) {
  .language-switcher {
    top: 10px;
    right: 10px;
    padding: 6px 10px;
  }

  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }

  .card-body {
    padding: 1rem;
  }

  .table-responsive {
    font-size: 0.85rem;
  }
}

/* Utility Classes */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.border-radius {
  border-radius: var(--border-radius);
}

.shadow-sm {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.shadow {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Modern Alerts */
.alert {
  border-radius: var(--border-radius-lg);
  border: none;
  font-weight: 600;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  backdrop-filter: blur(10px);
  border-left: 4px solid transparent;
}

.alert-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
  color: #065f46;
  border-left-color: var(--success-color);
}

.alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
  color: #991b1b;
  border-left-color: var(--danger-color);
}

.alert-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
  color: #92400e;
  border-left-color: var(--warning-color);
}

.alert-info {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
  color: #155e75;
  border-left-color: var(--info-color);
}

.alert .feather-sm {
  margin-right: 0.75rem;
  vertical-align: middle;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

button:focus, .btn:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* PDF查看器相关样式已移除 - 现在直接在新窗口打开PDF */
