* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #333;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

input, select, textarea {
    outline: none;
}

.table-container {
    background: #fff;
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.table-container .page-title { margin-bottom: 8px; }
.table-container .page-subtitle { margin-bottom: 20px; }
.table-container .page-header { margin-bottom: 20px; }
.table-container .page-search-bar,
.table-container .search-bar { margin-bottom: 20px; }
.table-container .summary-cards { margin-bottom: 24px; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    outline: none;
}

.search-actions {
    display: flex;
    gap: 8px;
}

.summary-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.summary-cards-two .summary-card {
    flex: 1;
    min-width: 0;
}

.summary-card {
    flex: 1;
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px 20px;
    border: 1px solid #e5e7eb;
}

.summary-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
}

.summary-value.blue {
    color: #3b82f6;
}

.summary-value.green {
    color: #10b981;
}

.summary-value.brown {
    color: #d97706;
}

.summary-value.orange {
    color: #f59e0b;
}

.summary-value.red {
    color: #ef4444;
}

.summary-value.purple {
    color: #8b5cf6;
}

.stock-warning-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    color: #92400e;
    font-size: 14px;
}
.stock-warning-tip .tip-icon { font-size: 18px; }
table tr.row-low-stock { background: #fffbeb; }
table td.cell-low-stock { color: #b45309; font-weight: 600; }
.low-stock-label { font-size: 12px; color: #f59e0b; margin-left: 4px; }

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.search-form .form-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form label {
    white-space: nowrap;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.search-form input,
.search-form select {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    background: #fff;
}

.search-form input:focus,
.search-form select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.btn:not(.btn-primary):not(.btn-danger):not(.btn-success) {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn:not(.btn-primary):not(.btn-danger):not(.btn-success):hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

table th,
table td {
    padding: 14px 16px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}


table th {
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
    text-align: center;
}

table tbody tr {
    transition: all 0.2s;
}

table tbody tr:hover {
    background-color: #f9fafb;
}

table tbody tr:last-child td {
    border-bottom: none;
}

.pagination {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: all 0.3s;
    font-weight: 500;
}

.pagination button:hover:not(:disabled) {
    color: #3b82f6;
    border-color: #3b82f6;
    background: #eff6ff;
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background: #f3f4f6;
}

.pagination .page-info {
    margin: 0 16px;
    color: #6b7280;
    font-size: 14px;
}

.table-loading,
.table-empty {
    text-align: center;
    color: #9ca3af;
    padding: 32px 16px !important;
}
.table-empty { color: #6b7280; }

.cell-ellipsis {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-item .error-tip {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
}

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.dialog-overlay.show {
    display: flex;
}

.dialog {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    min-width: 500px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ebeef5;
}

.dialog-title {
    font-size: 18px;
    font-weight: 500;
}

.dialog-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #909399;
}

.dialog-close:hover {
    color: #606266;
}

.dialog-body {
    margin-bottom: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item label {
    font-size: 12px;
    color: #6b7280;
}

.detail-item span,
.detail-item p {
    font-size: 14px;
    color: #111827;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.loading-tip {
    color: #6b7280;
    text-align: center;
    padding: 20px;
}

.dialog-form .form-item {
    margin-bottom: 15px;
}

.dialog-form label {
    display: block;
    margin-bottom: 5px;
    color: #606266;
}

.dialog-form input,
.dialog-form select,
.dialog-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
}

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

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: #fff;
    z-index: 2000;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.message-success {
    background-color: #67c23a;
}

.message-error {
    background-color: #f56c6c;
}

.message-warning {
    background-color: #e6a23c;
}

.status-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-success {
    background: #d1fae5;
    color: #065f46;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-info {
    background: #dbeafe;
    color: #1e40af;
}

.status-primary {
    background: #dbeafe;
    color: #1e40af;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f3f4f6;
}

.btn-success-icon {
    color: #10b981;
}

.btn-success-icon:hover {
    background: #d1fae5;
}

.btn-danger-icon {
    color: #ef4444;
}

.btn-danger-icon:hover {
    background: #fee2e2;
}

.status-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.status-tab {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
}

.status-tab:hover {
    border-color: #10b981;
    color: #10b981;
}

.status-tab.active {
    background: #fff;
    border: 2px solid #f59e0b;
    color: #f59e0b;
    font-weight: 500;
}

.status-tab span {
    margin-left: 4px;
    font-weight: 600;
}

/* 与用户管理、药品管理一致的页面搜索栏：胶囊输入框 + 右侧白底按钮 */
.page-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 4px 0;
}
.page-search-bar .search-input-wrapper {
    flex: 1;
    position: relative;
    max-width: 78%;
}
.page-search-bar .search-input-wrapper .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a7a7a7;
    font-size: 16px;
    pointer-events: none;
}
.page-search-bar .search-input-wrapper input {
    width: 100%;
    height: 40px;
    padding: 0 16px 0 42px;
    background-color: #f2f3f5;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
}
.page-search-bar .search-input-wrapper input::placeholder {
    color: #999999;
}
.page-search-bar .search-input-wrapper input:focus {
    outline: none;
    background-color: #e8e9eb;
}
.page-search-bar .search-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
/* 搜索栏「分类」标签、下拉、按钮统一 14px 字体（与 body 一致，覆盖 select 默认样式） */
.page-search-bar .search-actions .search-label,
.page-search-bar .search-actions .search-select,
.page-search-bar .search-actions .btn {
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 400;
    color: #333333;
}
.page-search-bar .search-label {
    line-height: 36px;
    white-space: nowrap;
}
.page-search-bar .search-select {
    height: 36px;
    padding: 0 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    line-height: 36px;
    background: #fff;
    min-width: 120px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}
.page-search-bar .search-actions .btn {
    padding: 8px 18px;
    height: 36px;
    line-height: 1;
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
}
.page-search-bar .search-actions .btn:hover {
    background: #f9fafb;
    border-color: #c0c4cc;
}
.page-search-bar .search-actions .btn.active {
    background: #ecfdf5;
    border-color: #10b981;
    color: #10b981;
    font-weight: 500;
}

/* 拒绝原因弹窗样式 */
.reject-tip {
    margin-bottom: 12px;
    font-size: 14px;
    color: #374151;
}
.reject-reason-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    color: #333;
}
.reject-reason-textarea:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
