body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.card {
    border-radius: 10px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.jumbotron {
    margin-top: 20px;
}

.btn-primary {
    background-color: #007bff;
    border: none;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Custom utility classes */
.text-purple {
    color: #6f42c1 !important;
}

/* Modern Card Styles */
.card-modern {
    border: none;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    overflow: hidden;
    position: relative;
}

.card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.card-modern .card-body {
    padding: 1.5rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.card-modern:hover .icon-box {
    transform: scale(1.1);
}

/* Icon Box Colors */
.icon-box-primary { background: rgba(13, 110, 253, 0.1); color: #0d6efd; }
.icon-box-success { background: rgba(25, 135, 84, 0.1); color: #198754; }
.icon-box-warning { background: rgba(255, 193, 7, 0.1); color: #ffc107; }
.icon-box-info { background: rgba(13, 202, 240, 0.1); color: #0dcaf0; }
.icon-box-danger { background: rgba(220, 53, 69, 0.1); color: #dc3545; }
.icon-box-purple { background: rgba(111, 66, 193, 0.1); color: #6f42c1; }

.card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.card-text {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.btn-link-modern {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    padding: 0;
    transition: all 0.2s;
}

.btn-link-modern:hover {
    padding-left: 5px;
}

.btn-link-modern i {
    font-size: 0.8rem;
    margin-left: 4px;
    transition: margin-left 0.2s;
}

/* Dark Mode Support for Modern Cards */
[data-bs-theme="dark"] .card-modern {
    background: #1e1e1e;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .card-modern:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .card-title {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .card-text {
    color: #adb5bd;
}

[data-bs-theme="dark"] .icon-box-primary { background: rgba(13, 110, 253, 0.2); color: #6ea8fe; }
[data-bs-theme="dark"] .icon-box-success { background: rgba(25, 135, 84, 0.2); color: #75b798; }
[data-bs-theme="dark"] .icon-box-warning { background: rgba(255, 193, 7, 0.2); color: #ffda6a; }
[data-bs-theme="dark"] .icon-box-info { background: rgba(13, 202, 240, 0.2); color: #6edff6; }
[data-bs-theme="dark"] .icon-box-danger { background: rgba(220, 53, 69, 0.2); color: #ea868f; }
[data-bs-theme="dark"] .icon-box-purple { background: rgba(111, 66, 193, 0.2); color: #a370f7; }

/* Dashboard Stats Widgets */
.dashboard-stats {
    margin-bottom: 0;
}

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 100%;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.05;
    z-index: 0;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.stat-content {
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.stat-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #212529;
}

.stat-content p {
    margin: 0;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Specific colors for stat cards */
.stat-card.purple { color: #6f42c1; }
.stat-card.purple .stat-icon { background: rgba(111, 66, 193, 0.1); color: #6f42c1; }

.stat-card.blue { color: #0d6efd; }
.stat-card.blue .stat-icon { background: rgba(13, 110, 253, 0.1); color: #0d6efd; }

.stat-card.orange { color: #fd7e14; }
.stat-card.orange .stat-icon { background: rgba(253, 126, 20, 0.1); color: #fd7e14; }

.stat-card.red { color: #dc3545; }
.stat-card.red .stat-icon { background: rgba(220, 53, 69, 0.1); color: #dc3545; }

.stat-card.cyan { color: #0dcaf0; }
.stat-card.cyan .stat-icon { background: rgba(13, 202, 240, 0.1); color: #0dcaf0; }

.stat-card.gold { color: #ffc107; }
.stat-card.gold .stat-icon { background: rgba(255, 193, 7, 0.1); color: #ffc107; }

.stat-card.green { color: #198754; }
.stat-card.green .stat-icon { background: rgba(25, 135, 84, 0.1); color: #198754; }

/* Dark mode for stats */
[data-bs-theme="dark"] .stat-card {
    background: #2b3035;
    border-color: rgba(255,255,255,0.05);
}

[data-bs-theme="dark"] .stat-content h3 {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .stat-content p {
    color: #adb5bd;
}

/* Modern Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.15);
    border: none;
}


.app-navbar {
  backdrop-filter: saturate(180%) blur(12px);
  background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
  box-shadow: 0 10px 30px rgba(13, 110, 253, 0.15);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.app-navbar .navbar-brand {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-navbar .navbar-brand:hover {
  color: #fff;
  opacity: 0.9;
}

.app-navbar .nav-link {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.app-navbar .dropdown-menu {
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.app-navbar .dropdown-item {
  border-radius: 8px;
}

[data-bs-theme="dark"] .app-navbar {
  background: linear-gradient(135deg, #1f2d3d 0%, #0d6efd 100%);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

[data-bs-theme="dark"] .app-navbar .dropdown-menu {
  background: #2b3035;
  border-color: rgba(255,255,255,0.08);
}

.notification-bar {
  position: relative;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

.notification-bar .notice-container {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(13,110,253,0.10) 0%, rgba(13,202,240,0.10) 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(13,110,253,0.15);
  padding: 12px 48px 12px 16px;
  overflow: hidden;
  width: fit-content;
  max-width: 1200px;
}

.notice-stream {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: center;
}

.notice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.notice-icon {
  width: 28px;
  height: 28px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0d6efd;
  background: transparent;
}

.notice-content {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.notice-title {
  font-weight: 600;
  color: #0d6efd;
  font-size: 0.95rem;
}

.notice-text {
  color: #495057;
  font-size: 0.90rem;
}

.notice-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255,255,255,0.2);
  color: #06326e;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
}

.notice-close:hover {
  background: rgba(255,255,255,0.35);
}

[data-bs-theme="dark"] .notice-container {
  background: linear-gradient(135deg, rgba(13,110,253,0.15) 0%, rgba(13,202,240,0.12) 100%);
  border-color: rgba(255,255,255,0.10);
}

[data-bs-theme="dark"] .notice-card {
  background: transparent;
  border-color: transparent;
}

[data-bs-theme="dark"] .notice-text {
  color: #ced4da;
}

[data-bs-theme="dark"] .notice-close {
  color: #e9f1ff;
}

.notice-link {
  color: #0d6efd;
  font-weight: 500;
  text-decoration: underline;
}

[data-bs-theme="dark"] .notice-link {
  color: #6ea8fe;
}

.notice-sep {
  color: #6c757d;
  margin: 0 8px;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.welcome-title {
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.welcome-text {
    font-size: 1.15rem;
    opacity: 0.95;
    max-width: 600px;
    font-weight: 400;
    line-height: 1.6;
}

/* Welcome Info Badge */
.welcome-info {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.info-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-bottom: 0.2rem;
}

.info-value {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.weather-icon {
    font-size: 1.25rem;
}

.info-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
}

/* Dark mode adjustment for info badge */
[data-bs-theme="dark"] .welcome-info {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 991px) {
    .welcome-info {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-top: 1.5rem;
        width: 100%;
        justify-content: space-around;
    }
    
    .info-divider {
        display: none;
    }
}

/* Dark mode adjustment for banner */
[data-bs-theme="dark"] .welcome-banner {
    background: linear-gradient(135deg, #0a58ca 0%, #087990 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 添加Bootstrap图标支持 */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css");

/* Dark Mode Styles */
[data-bs-theme="dark"] body {
    background-color: #121212;
    color: #e0e0e0;
}

/* Override Bootstrap Background Utilities for Dark Mode */
[data-bs-theme="dark"] .bg-light {
    background-color: #121212 !important; /* Match body background for better contrast with cards */
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #1e1e1e !important; /* Card surface color */
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .jumbotron {
    background-color: #121212;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .card {
    background-color: #1e1e1e;
    border-color: #333;
    color: #e0e0e0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

[data-bs-theme="dark"] .card-header {
    background-color: #2c2c2c;
    border-bottom-color: #333;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .card-footer {
    background-color: #2c2c2c;
    border-top-color: #333;
}

[data-bs-theme="dark"] .table {
    color: #e0e0e0;
    border-color: #333;
}

[data-bs-theme="dark"] .table thead th {
    border-bottom-color: #444;
}

[data-bs-theme="dark"] .table td, 
[data-bs-theme="dark"] .table th {
    border-top-color: #333;
}

[data-bs-theme="dark"] .form-control {
    background-color: #2c2c2c;
    border-color: #444;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: #333;
    border-color: #007bff;
    color: #fff;
}

[data-bs-theme="dark"] .form-select {
    background-color: #2c2c2c;
    border-color: #444;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: #1e1e1e;
    border-color: #333;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .modal-content {
    background-color: #1e1e1e;
    border-color: #333;
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    border-color: #333;
}

[data-bs-theme="dark"] .close {
    color: #e0e0e0;
}

/* Adjust links in dark mode */
[data-bs-theme="dark"] a {
    color: #6ea8fe;
}

[data-bs-theme="dark"] a:hover {
    color: #8bb9fe;
}

/* Dark mode adjustments for utilities */
[data-bs-theme="dark"] .text-purple {
    color: #a370f7 !important; /* Lighter purple for dark mode */
}

[data-bs-theme="dark"] .text-muted {
    color: #adb5bd !important; /* Lighter gray for dark mode */
}

/* Adjust standard bootstrap colors for dark mode visibility */
[data-bs-theme="dark"] .text-success {
    color: #75b798 !important; /* Lighter green */
}

[data-bs-theme="dark"] .text-warning {
    color: #ffda6a !important; /* Lighter yellow */
}

[data-bs-theme="dark"] .text-info {
    color: #6edff6 !important; /* Lighter cyan */
}

[data-bs-theme="dark"] .text-danger {
    color: #ea868f !important; /* Lighter red */
}

[data-bs-theme="dark"] .text-primary {
    color: #6ea8fe !important; /* Lighter blue */
}

[data-bs-theme="dark"] .btn-primary.disabled, 
[data-bs-theme="dark"] .btn-primary:disabled {
    background-color: #444;
    border-color: #444;
    color: #888;
}

/* Dark mode for specific notification banner if exists */
[data-bs-theme="dark"] div[style*="background-color: #e3f2fd"] {
    background-color: #1e3a52 !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] div[style*="background-color: #e3f2fd"] strong {
    color: #6ea8fe !important;
}

[data-bs-theme="dark"] div[style*="background-color: #e3f2fd"] span {
    color: #ccc !important;
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #1e1e1e;
    border-color: #333;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #2c2c2c;
    color: #fff;
}

[data-bs-theme="dark"] .dropdown-divider {
    border-top-color: #333;
}

/* Modern Search Box Styling */
.search-wrapper-modern {
    position: relative;
    padding: 2px;
    border-radius: 50px;
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-wrapper-modern:focus-within {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    box-shadow: 0 10px 25px rgba(13, 110, 253, 0.15), 0 5px 10px rgba(13, 110, 253, 0.05);
    transform: translateY(-2px);
}

.search-inner {
    background: #ffffff;
    border-radius: 48px;
    display: flex;
    align-items: center;
    padding: 0.6rem 1.5rem;
    height: 100%;
    position: relative;
    z-index: 2;
}

[data-bs-theme="dark"] .search-wrapper-modern {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .search-inner {
    background: #212529;
}

.search-input-modern {
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    width: 100%;
    font-size: 1rem;
    color: #495057;
    outline: none !important;
    box-shadow: none !important;
    font-weight: 500;
}

.search-input-modern::placeholder {
    color: #adb5bd;
    font-weight: 400;
    transition: color 0.3s ease;
}

.search-wrapper-modern:focus-within .search-input-modern::placeholder {
    color: #ced4da;
}

[data-bs-theme="dark"] .search-input-modern {
    color: #e9ecef;
}

[data-bs-theme="dark"] .search-input-modern::placeholder {
    color: #6c757d;
}

.search-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 1.2rem;
}

.search-wrapper-modern:focus-within .search-icon-wrapper {
    color: #0d6efd;
    transform: scale(1.1) rotate(10deg);
}

[data-bs-theme="dark"] .search-wrapper-modern:focus-within .search-icon-wrapper {
    color: #6ea8fe;
}

.search-shortcut {
    font-size: 0.75rem;
    color: #adb5bd;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 2px 8px;
    margin-left: 10px;
    background-color: #f8f9fa;
    user-select: none;
    pointer-events: none;
    transition: all 0.3s ease;
}

.search-wrapper-modern:focus-within .search-shortcut {
    opacity: 0;
    transform: translateX(10px);
}

[data-bs-theme="dark"] .search-shortcut {
    background-color: #343a40;
    border-color: #495057;
    color: #6c757d;
}
