* {
  margin: 0;
  padding: 0;

}

body {
  background-color: #f1f2f3;
}

.container {
  width: 100%;
  max-width: 1420px;
  min-width: 1240px;
  margin: 20px auto;
  box-sizing: border-box;
  color: #333;
  line-height: 1.6;
}

.container *{
  box-sizing: border-box;
}

.container header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  font-size: 28px;
  margin-bottom: 5px;
  color: #2c3e50;
}

header .subtitle {
  font-size: 15px;
  color: #7f8c8d;
}

.control-panel {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    line-height: 1.4;
}

.stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
}

.stat-item {
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #e9ecef;
}

.stat-item.highlight {
    background: #e7f3ff;
    border-color: #b3d9ff;
    color: #0066cc;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

.search-filter {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    width: 220px;
}

.category-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 150px;
    cursor: pointer;
}

.category-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.category-select:hover {
    border-color: #007bff;
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8f9fa;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
}

td {
    padding: 10px 4px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

tr:hover {
    background-color: #f8f9fa;
}

tr.category-header {
    background: #e7f3ff;
    font-weight: 600;
    font-size: 1.05rem;
}

tr.category-header td {
    padding: 10px 6px;
    border-bottom: 2px solid #b3d9ff;
}

.medicine-checkbox {
    transform: scale(1.2);
    cursor: pointer;
}

.importance-5 {
    color: #dc3545;
    font-weight: bold;
}

.importance-4 {
    color: #fd7e14;
    font-weight: bold;
}

.importance-3 {
    color: #ffc107;
    font-weight: bold;
}

.importance-2 {
    color: #20c997;
    font-weight: bold;
}

.importance-1 {
    color: #6c757d;
    font-weight: bold;
}

.footer {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
}

.footer-section {
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.feature-item h4 {
    color: #495057;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notice {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notice.show {
    opacity: 1;
}

.notice.error {
    background: #dc3545;
}

.notice.warning {
    background: #ffc107;
    color: #212529;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #495057;
    background: #f8f9fa;
}

.medicine-details {
    display: grid;
    gap: 15px;
}

.detail-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    align-items: start;
}

.detail-label {
    font-weight: 600;
    color: #495057;
}

.detail-value {
    color: #6c757d;
    line-height: 1.5;
}

.medicine-name {
    cursor: pointer;
    color: #007bff;
    transition: color 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.medicine-name:hover {
    color: #0056b3;
    background: #f8f9fa;
}